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

[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