jackall
You can change this now in User CP.
- Reaction score
- 37
these are supposed to teleport a unit x.y seconds after its been ordered to move somewhere but for some reason...
...the second trigger shows the "Target is inside minimum range" 1/2/3 times, based on 'A000' level
edit: this could be used for a timed blink
also, the unit wont stop when its ordered
JASS:
function Trig_learn_Actions takes nothing returns nothing
if (GetLearnedSkill() == 039;A000039;) then
call TriggerRegisterUnitEvent( gg_trg_teleport, GetTriggerUnit(), EVENT_UNIT_ISSUED_POINT_ORDER )
endif
endfunction
function InitTrig_learn takes nothing returns nothing
set gg_trg_learn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_learn, EVENT_PLAYER_HERO_SKILL )
call TriggerAddAction( gg_trg_learn, function Trig_learn_Actions )
endfunction
JASS:
function Trig_teleport_Actions takes nothing returns nothing
local integer i = GetIssuedOrderId()
local location whereTo = GetOrderPointLoc()
local unit u = GetTriggerUnit()
local location origin = GetUnitLoc(u)
local real distToGo = DistanceBetweenPoints(whereTo,origin)
local real toWait = distToGo / (GetUnitAbilityLevel(u,039;A000039;) * 1000)
local effect SFX
if (i == 851986) or (i == 851971) then
if distToGo <= 200 then
call DisplayTextToPlayer(GetOwningPlayer(u),0,0,"Target is inside minimum range")
return
endif
call IssueImmediateOrder(u,"stop")
call TriggerSleepAction(toWait)
set SFX = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",whereTo)
call SetUnitPositionLoc(u,whereTo)
call DestroyEffect(SFX)
call RemoveLocation(whereTo)
call RemoveLocation(origin)
elseif i != 851986 or i != 851971 then
call DoNothing()
endif
endfunction
function InitTrig_teleport takes nothing returns nothing
set gg_trg_teleport = CreateTrigger( )
call TriggerAddAction( gg_trg_teleport, function Trig_teleport_Actions )
endfunction
...the second trigger shows the "Target is inside minimum range" 1/2/3 times, based on 'A000' level
edit: this could be used for a timed blink
also, the unit wont stop when its ordered