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

[vJASS] Tornado Event Detection

Status
Not open for further replies.
Level 13
Joined
May 24, 2005
Messages
609
Hi,

Is there any way to detect the tornado spin? I need to catch the event when a unit is thrown in the air or getting back on the ground.

I've tried the script below but it does not fire. Maybe, because the tornado unit is no usual unit and does not throw the spell cast event.

JASS:
scope Tornado initializer Init

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'Atsp' 
endfunction

private function Actions takes nothing returns nothing
    call Debug_Message("Tornado Target: "+GetUnitName(GetSpellTargetUnit()))
    // do something with the unit that was affected by the tornado..
endfunction

//===========================================================================
public function Init takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_SPELL_EFFECT) 
    call TriggerAddCondition(trg, Condition(function Conditions))
    call TriggerAddAction(trg, function Actions)
endfunction

endscope

Maybe you got other ideas how to deal with this problem?

I hope there is a solution to this issue. Any help is much appreciated!

Thanks and cheers
 
Last edited:
Status
Not open for further replies.
Top