• 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.

[JASS] Check if unit is still casting an ability

Status
Not open for further replies.
Level 7
Joined
Mar 8, 2009
Messages
360
i'm trying to make an ability with a casting time of 4 sec. I use a timer that runs another function after 3.50 seconds. Then i should find a way to see that the unit is still casting the ability but i don't know how to do that.
The ability i'm using is flame strike.
 
Level 5
Joined
Dec 18, 2007
Messages
205
or if it does not matter and your trigger can also run when he casts the spell, you can use
Unit - Aunit starts the effect of an ability

But is this not possible with one of the events like
otherwise just use the order<->string comparison
 
Level 4
Joined
Mar 14, 2009
Messages
98
Use a trigger instead of a timer. Add two events to it, the first one should be a timer event to happen after 3.50 seconds, the second should be for spell endcast.

JASS:
function NewTriggerActions takes nothing returns nothing
if GetTriggerEventId() == EVENT_UNIT_SPELL_ENDCAST then
call DestroyTrigger(GetTriggeringTrigger())
else
call WhateverItShouldBeDoing()
endif
endfunction

Nevermind this. I just learned something: dynamic triggers are evil.
 
Last edited:
Status
Not open for further replies.
Top