• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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