This skill is SUPPOSED to slide to the target, but if you target the enemy unit and cast the ability and than order-move as it goes off, the unit will slide in whatever direction you clicked for a distance instead.
It's pretty troublesome and I can't seem to get it right, I managed to get it to stop happening, but than it wouldn't slide at all, just do the damage, kind of pointless.
I am wondering if maybe "GetSpellAbilityUnit" isn't nulling the variable after the wait, but if it is, I'm not sure how to fix it. I know it's ridiculously messy, sorry =(. Any insight would be great, thanks.
And the other part is
It's pretty troublesome and I can't seem to get it right, I managed to get it to stop happening, but than it wouldn't slide at all, just do the damage, kind of pointless.
I am wondering if maybe "GetSpellAbilityUnit" isn't nulling the variable after the wait, but if it is, I'm not sure how to fix it. I know it's ridiculously messy, sorry =(. Any insight would be great, thanks.
JASS:
function Trig_Cloud_Chrono_Func001C takes nothing returns boolean
if(not(GetSpellAbilityId()=='A09R'))then
return false
endif
return true
endfunction
...
function Trig_Cloud_Chrono_Actions takes nothing returns nothing
if(Trig_Cloud_Chrono_Func001C())then
call TriggerSleepAction(0.20)
set udg_Loc1=GetUnitLoc(GetSpellAbilityUnit())
set udg_CloudLOC=PolarProjectionBJ(GetUnitLoc(GetSpellTargetUnit()),5.00,0)
set udg_CloudClimm=GetSpellAbilityUnit()
call PauseUnitBJ(true,udg_CloudClimm)
call SetUnitPathing(udg_CloudClimm,false)
call RemoveLocation(udg_Loc1)
call SetUnitAnimation(udg_CloudClimm,"attack")
call TriggerSleepAction((DistanceBetweenPoints(GetUnitLoc(udg_CloudClimm),udg_CloudLOC)/1500.00))
call PauseUnitBJ(false,udg_CloudClimm)
call SetUnitPathing(udg_CloudClimm,true)
set udg_CloudClimm=null
call RemoveLocation(udg_CloudLOC)
else
endif
endfunction
...
function InitTrig_Cloud_Chrono takes nothing returns nothing
set gg_trg_Cloud_Chrono=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Cloud_Chrono,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Cloud_Chrono,function Trig_Cloud_Chrono_Actions)
endfunction
And the other part is
JASS:
function Trig_Moving_Func009C takes nothing returns boolean
if(not(IsUnitAliveBJ(udg_CloudClimm)==true))then
return false
endif
return true
endfunction
...
function Trig_Moving_Actions takes nothing returns nothing
if(Trig_Moving_Func009C())then
set udg_Loc1=GetUnitLoc(udg_CloudClimm)
call AddSpecialEffectLocBJ(udg_Loc1,"Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl")
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call SetUnitPositionLoc(udg_CloudClimm,PolarProjectionBJ(udg_Loc1,10.00,AngleBetweenPoints(udg_Loc1,udg_CloudLOC)))
call RemoveLocation(udg_Loc1)
else
endif
endfunction
...
function InitTrig_Moving takes nothing returns nothing
set gg_trg_Moving=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Moving,0.01)
call TriggerAddAction(gg_trg_Moving,function Trig_Moving_Actions)
endfunction
Last edited: