OK my bad , I want an ability that recharge itself whenever you deal damage to a ennemy unit with the unit that has the ability,
But also that you need to do that every time you want to use the ability.
Like imagine I have a morph ability for the high templare that morph him in an archon ( then after some time it unmorph itself) but to be able to use it the templar needs to deal first for exemple 500 damage with any of its spells. Then after he use it, he unmorph but to reuse it he needs to deal another 500 damage.
Well this can be done in several ways but there are many things to consider so I’m not gonna give you an exact solution, but rather the basic principles to do something similar and the rest you will have to figure it out yourself. First you need two buffs, one will apply a stack of a buff that acts as a “counter”, that upon reaching a certain number of stacks will restore the cooldown or the charges of the ability you want to use, the “counter” buff will be the second, also create an apply behavior effect that applies 1 stack of the buff, and in the effect unit field set it to source. Then to set up the buff that adds charge go to the damage response, and in the “Combat” tab, set “Chance” to 1, set the handle field, to the apply behavior effect that applies the “counter” buff, then set “Location” to Attacker and in the “Minimum” enter a number equal to minimum amount of damage that holder of the rechargeable ability needs to deal to get a stack of the counter buff (so for example if your unit has multiple abilities that deal 10 damage, then you can set the minimum damage to 10, then set the counter buff to have 50 stacks, so after the unit gest 50 stacks of the counter buff, you can add an effect in the refresh effect field of the counter buff, that restores the charges or the cooldown of the rechargeable ability).
After setting the main buff that applies the charges, you need to create the effect that restores the charges or cooldown for that you need to create a modify unit effect. After go to the modify unit effect and go to the field called cost, the window of that field adds a new entry, in the new entry, set the ability field to your rechargeable ability, then go the “none” tab of the window and set cooldown operation to “Set”. If your ability requires charges in order to be used go to the charge field in the cost tab, and type -1 (to restore 1 ability charge), if your ability is a regular cooldown ability go to the cooldown field in the cost tab and type zero (to restore its cooldown). After that set impact unit within the modify unit effect to source.
After that create a set effect and add to the set the modify unit effect, plus a remove behavior effect that removes all stacks of the counter buff.
Finally go to the “counter” buff and in the refresh effect field, add the Set effect previously created, then go to validators and create a behavior count validator the checks if a unit has the maximum number of stacks of the “counter” buff and set the validator unit field of the validator created to source. Then add the validator you created to the set effect and add the buff that applies the counter buff to the unit with the rechargeable ability.
What this does, is that you have unit with a buff that applies a “counter” buff whenever it deals X damage, and when the unit gets the maximum number of stacks, the refresh effect in the counter buff will restore/reset the cooldown/charges of the rechargeable ability.
If you had trouble following or understanding what I’m talking about, is because you lack the knowledge you need to accomplish what you need in this case, so you will have to read the entries that cover ability costs, buff behaviors, apply behavior effects, validators and modify unit effects in the sc2mapster wikia or any online forum that covers those. You can also check in the editor the campaign hero Vorazun, she has a blink ability and a teleport attack ability, and the blink ability restores the cooldown of the teleport attack whenever its used.
To know if a buff is stacking, while you are testing things, simply take the buff that can have multiple stacks, go to the behavior modification field, find the life armor bonus field and set it to 1, with that your unit will gain +1 bonus to armor whenever it gets a stack of the buff of the stacking buff and you can see the total bonus to armor by placing the cursor over the armor icon of your unit.
Right now im trying to make an ability that you need to kill or deal a certain amount of damage to be used.
But it also need that when you use it you need to redeal the damage or do the kills.
For the fist part I know how to do but the second one seems to me much harder.
So if anyone have an idea, tell me :)
Your post is too vague, describe in detail what you are trying to accomplish, if you want any helpful feedback.
OK my bad , I want an ability that recharge itself whenever you deal damage to a ennemy unit with the unit that has the ability,
But also that you need to do that every time you want to use the ability.
Like imagine I have a morph ability for the high templare that morph him in an archon ( then after some time it unmorph itself) but to be able to use it the templar needs to deal first for exemple 500 damage with any of its spells. Then after he use it, he unmorph but to reuse it he needs to deal another 500 damage.
If its still too vague tell me ;)
And also another question I cant find the adept launch animation
Well this can be done in several ways but there are many things to consider so I’m not gonna give you an exact solution, but rather the basic principles to do something similar and the rest you will have to figure it out yourself. First you need two buffs, one will apply a stack of a buff that acts as a “counter”, that upon reaching a certain number of stacks will restore the cooldown or the charges of the ability you want to use, the “counter” buff will be the second, also create an apply behavior effect that applies 1 stack of the buff, and in the effect unit field set it to source. Then to set up the buff that adds charge go to the damage response, and in the “Combat” tab, set “Chance” to 1, set the handle field, to the apply behavior effect that applies the “counter” buff, then set “Location” to Attacker and in the “Minimum” enter a number equal to minimum amount of damage that holder of the rechargeable ability needs to deal to get a stack of the counter buff (so for example if your unit has multiple abilities that deal 10 damage, then you can set the minimum damage to 10, then set the counter buff to have 50 stacks, so after the unit gest 50 stacks of the counter buff, you can add an effect in the refresh effect field of the counter buff, that restores the charges or the cooldown of the rechargeable ability).
After setting the main buff that applies the charges, you need to create the effect that restores the charges or cooldown for that you need to create a modify unit effect. After go to the modify unit effect and go to the field called cost, the window of that field adds a new entry, in the new entry, set the ability field to your rechargeable ability, then go the “none” tab of the window and set cooldown operation to “Set”. If your ability requires charges in order to be used go to the charge field in the cost tab, and type -1 (to restore 1 ability charge), if your ability is a regular cooldown ability go to the cooldown field in the cost tab and type zero (to restore its cooldown). After that set impact unit within the modify unit effect to source.
After that create a set effect and add to the set the modify unit effect, plus a remove behavior effect that removes all stacks of the counter buff.
Finally go to the “counter” buff and in the refresh effect field, add the Set effect previously created, then go to validators and create a behavior count validator the checks if a unit has the maximum number of stacks of the “counter” buff and set the validator unit field of the validator created to source. Then add the validator you created to the set effect and add the buff that applies the counter buff to the unit with the rechargeable ability.
What this does, is that you have unit with a buff that applies a “counter” buff whenever it deals X damage, and when the unit gets the maximum number of stacks, the refresh effect in the counter buff will restore/reset the cooldown/charges of the rechargeable ability.
If you had trouble following or understanding what I’m talking about, is because you lack the knowledge you need to accomplish what you need in this case, so you will have to read the entries that cover ability costs, buff behaviors, apply behavior effects, validators and modify unit effects in the sc2mapster wikia or any online forum that covers those. You can also check in the editor the campaign hero Vorazun, she has a blink ability and a teleport attack ability, and the blink ability restores the cooldown of the teleport attack whenever its used.
Well this is as far as I go, good luck!
thanks I just have some problems with trouble shooting cuz i cant know if the buff is actually stacking
To know if a buff is stacking, while you are testing things, simply take the buff that can have multiple stacks, go to the behavior modification field, find the life armor bonus field and set it to 1, with that your unit will gain +1 bonus to armor whenever it gets a stack of the buff of the stacking buff and you can see the total bonus to armor by placing the cursor over the armor icon of your unit.
thanks for helping