• 🏆 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!

Periodic check if unit is still channeling

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
My next spell is Inferno from Diablo 2. The caster had to channel this spell, and it would do damage over time to enemies in a line in front of them.

I want to make this a periodic trigger that releases "Breath of Fire" from dummy units every 0.2 seconds but only if the caster is still channeling. Now I know how to make periodic triggers from my Frozen Orb spell, but I don't know how to make the spell stop if the caster stops channeling.
 
Level 3
Joined
Mar 25, 2009
Messages
32
i think you can also use something like this
JASS:
if GetUnitOrder(caster) != "breathoffire" then
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Use some kind of flag (e.g. set custom value of a unit to 1, or use Table, ...) that tells you whether the unit is channeling the spell or not. When the unit starts channeling it, set the flag to 1, when the unit stops channeling set it back to 0. While the flag is set to true, do your breath of fire attack.
 
Status
Not open for further replies.
Top