• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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