- Joined
- Oct 18, 2007
- Messages
- 930
JASS:
function S_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function S_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit a = GetSpellTargetUnit()
local location loc1
local location loc2
local real degrees
local effect se
local effect see
set loc1 = GetUnitLoc(u)
set loc2 = GetUnitLoc(a)
set degrees = GetUnitFacing(a)
call BJDebugMsg("TEST")
call AddSpecialEffectLoc( "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl", loc1 )
set se = GetLastCreatedEffectBJ()
call AddSpecialEffectTarget( "Sweep.mdx", u, "chest" )
set see = GetLastCreatedEffectBJ()
call DestroyEffect(se)
call PolledWait(0.01)
call DestroyEffect(see)
call SetUnitPositionLocFacingLocBJ( u, PolarProjectionBJ(loc2, 100.00, (degrees + 180.00 ) ), loc2 )
call RemoveLocation( loc1 )
call RemoveLocation( loc2 )
set loc1 = null
set loc2 = null
set u = null
set a = null
set se = null
set see = null
endfunction
//*-------------------------------------------------------------------------------------------------------*
//| *END OF SCRIPT* |
//*-------------------------------------------------------------------------------------------------------*
function InitTrig_Charge takes nothing returns nothing
local trigger S = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( S, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( S, Condition( function S_Actions ) )
call TriggerAddAction( S, function S_Actions )
set S = null
endfunction
It does all the things but not the move, hmm wonder why it does that, and the strange thing is that the se effects are created but not removed... Hmm..
Any ideas?