I'm having trouble with a couple abilities, they seem to work correctly, but have a small glitch. In the case of both, the problem is that, when you click the ability, and target the unit of which you'll be using the ability on, as your unit moves into place right BEFORE the ability goes off, if you order-move, the ability will malfunction.
In the case of this one, if you order-move when it's about to go off, you get warped to the middle of the map.
In this one, if you order-move when it's about to go off, the unit just keeps moving for awhile, it doesn't always stop in a pleasant place. =(
Any help would be awesome =( thanks much
In the case of this one, if you order-move when it's about to go off, you get warped to the middle of the map.
JASS:
function Trig_Akira_Func002C takes nothing returns boolean
if(not(GetSpellAbilityId()=='A024'))then
return false
endif
return true
endfunction
function Trig_Akira_Actions takes nothing returns nothing
if(Trig_Akira_Func002C())then
call TriggerSleepAction(0.10)
set udg_Akira=GetSpellAbilityUnit()
set udg_Loc2=GetUnitLoc(udg_Akira)
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=GetUnitAbilityLevelSwapped('A024',udg_Akira)
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call UnitAddItemByIdSwapped('I00H',GetSpellAbilityUnit())
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call RemoveLocation(udg_Loc2)
set udg_Loc2=PolarProjectionBJ(GetUnitLoc(GetSpellTargetUnit()),50.00,GetUnitFacing(GetSpellTargetUnit()))
call SetUnitFacingToFaceUnitTimed(udg_Akira,GetSpellTargetUnit(),0.01)
call SetUnitPositionLocFacingLocBJ(udg_Akira,udg_Loc2,udg_Loc2)
call AddSpecialEffectLocBJ(udg_Loc2,"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call RemoveLocation(udg_Loc2)
endfunction
function InitTrig_Akira takes nothing returns nothing
set gg_trg_Akira=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Akira,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Akira,function Trig_Akira_Actions)
endfunction
In this one, if you order-move when it's about to go off, the unit just keeps moving for awhile, it doesn't always stop in a pleasant place. =(
JASS:
function Trig_Akira_Choke_Func001C takes nothing returns boolean
if(not(GetSpellAbilityId()=='A09R'))then
return false
endif
return true
endfunction
function Trig_Akira_Choke_Actions takes nothing returns nothing
if(Trig_Akira_Choke_Func001C())then
call TriggerSleepAction(0.20)
set udg_Loc1=GetUnitLoc(GetSpellAbilityUnit())
set udg_AkiraLOC=PolarProjectionBJ(GetUnitLoc(GetSpellTargetUnit()),5.00,0)
set udg_AkiraChoke=GetSpellAbilityUnit()
call PauseUnitBJ(true,udg_AkiraChoke)
call SetUnitPathing(udg_AkiraChoke,false)
call RemoveLocation(udg_Loc1)
call SetUnitAnimation(udg_AkiraChoke,"attack")
call TriggerSleepAction((DistanceBetweenPoints(GetUnitLoc(udg_AkiraChoke),udg_AkiraLOC)/1500.00))
call PauseUnitBJ(false,udg_AkiraChoke)
call SetUnitPathing(udg_AkiraChoke,true)
set udg_AkiraChoke=null
call RemoveLocation(udg_AkiraLOC)
else
endif
function InitTrig_Akira_Choke takes nothing returns nothing
set gg_trg_Akira_Choke=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Akira_Choke,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Akira_Choke,function Trig_Akira_Choke_Actions)
endfunction
Any help would be awesome =( thanks much