[JASS] Odd glitch...

Status
Not open for further replies.
Level 2
Joined
Oct 31, 2007
Messages
14
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.

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:
Level 2
Joined
Oct 31, 2007
Messages
14
That's just because there's like 20 triggers in one function =S, the other parts wern't relevant so i cut them out. Forgot to freehand in the endfunctions when I cut and pasted. But trust me, there are no syntax errors from JassCraft or WE. - At any rate, I went and added them all in for ya. ^_^;
 
Level 12
Joined
Aug 20, 2007
Messages
866
Thanks for your oh-so-useful comment. I'll treasure it. Now, if you have anything useful to say, please comment again.

Eh, hes a bit touchy

Uhh, yeah I have a large amount of difficulty reading GUI converted to JASS, so I am sorry, it would take me some reading and digesting before I could respond with an educated guess

(Btw, you really should've expected a few posts such as the above)

I might post back later
 
Status
Not open for further replies.
Top