• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need help with an ability

Status
Not open for further replies.
Level 6
Joined
Apr 15, 2012
Messages
205
I'm making an ability that you can toggle. I have made it so that when it's on you reduce the hit point regen to -5 to all enemy units around you. I have also made it so that you gain stacks each second when you have it toggled on.

1. The way this works is that when the ability is toggled on, it applies a periodic behavior to the unit. The behavior runs a search effect every 0.125 sec. The search effect applies runs an effect, the effect applies a debuff behavior to all units around it in a 5 unit radius. The behavior reduces the HP reg. Then to the second part of the ability.

2. When it's toggled on it also applies a periodic behavior that runs a search effect each 1 sec. The search effect picks the caster unit and runs an effect. The effect applies a behavior to the caster. This behavior should stack, when it stacks, the buff behavior should be refreshed, how do I do that?

Another problem is that I for some reason can't apply 2 behaviors at the same time when the ability is toggled. In the list where the behaviors are in the Ability - Behavior, the behavior that is on the top only runs.

If you need more information or clarification, tell me.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Make sure the behaviour has a stack quantity large enough to support your stacking needs.

Use a set effect that runs both effects. Just becase the field is an array does not mean all elements will be run (eg, perodic effects will run them one at a time).
 
Status
Not open for further replies.
Top