How can I create a buff which increases the regeneration of energy for a unit when he is not casting?
Like, he casts and the regen stops. After 1 second of no cast, his regen is at 1, 2 seconds -> 2, 3 seconds -> 4... increasing with each second passed.
Thanks in advance
!
Please report errors in the Staredit.Network forum.
I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.
If you have only a few units, you might want to use triggers to simplify that...
- So you would use a dummy effect with each spell in a set which starts a trigger that sets the regeneration rate to 0 (unit property).
- You also add a NoRegenerationPhaseBehavior and remove the existing PeriodicRegenerationDummyEffectBehavior (which lets a trigger execute the regeneration and increase the regeneration rate) on the unit.
- After the NoRegenerationPhaseBehavior runs out, you apply the PeriodicRegenerationDummyEffectBehavior again. So the PeriodicRegenerationDummyEffectBehavior would be the unit's default behavior (existent at start).
Without trigger usage you might need to create a chain of behaviors that add each other after another. Don't use stacks because I've read that high stack counts can create lag. If you cast, you would execute a set that remove all of these behaviors and applies the first one (no regeneration behavior).
You might even try to create the behavior chain with xml editing inside the mpq because that should be faster than editor usage for copy paste.