Hi. How do you detect a unit's order before a spell?
I'm trying to detect if a unit's order was "move" or "smart" or something before the ability was cast. But this Debug message is only showing it the last order was channel.
I'm using LastOrder.
JASS:
library Blink initializer onInit requires TimerUtils, UFSYS, SpellEvent
globals
private constant integer ABILITY_ID = 039;A000039;
private constant integer DUMMY_ABILITY_ID = 039;A001039;
private constant real CAST_POINT = 0.300
endglobals
private function onEffect takes nothing returns nothing
endfunction
private function onCast takes nothing returns nothing
call BJDebugMsg( GetLastOrderString( SpellEvent.CastingUnit ) )
call AddTempAbility( SpellEvent.CastingUnit, DUMMY_ABILITY_ID, CAST_POINT+0.10)
endfunction
private function onInit takes nothing returns nothing
call RegisterSpellChannelResponse( ABILITY_ID, onCast )
call RegisterSpellEffectResponse( ABILITY_ID, onEffect )
endfunction
endlibrary
I'm trying to detect if a unit's order was "move" or "smart" or something before the ability was cast. But this Debug message is only showing it the last order was channel.
I'm using LastOrder.