cleeezzz
The Undead Ranger.
- Reaction score
- 268
ok i dont know if its just me but when i triggered a unit to use Windwalk or beserk, it never canceled its current order. But now it does?
heres one example that USED to work, basically it just waits a specified time and orders the unit to WW.
when i click ww on the unit however, it does not interrupt the order.
JASS:
library DelayedMeld requires KT
struct DMS
unit u
method onDestroy takes nothing returns nothing
set .u = null
endmethod
endstruct
private function Fade takes nothing returns boolean
local DMS d = KT_GetData()
if GetUnitState( d.u, UNIT_STATE_LIFE) < .405 then
call d.destroy()
return true
endif
call SetPlayerAbilityAvailable(GetOwningPlayer(d.u), 039;A016039;, true)
call IssueImmediateOrder(d.u, "windwalk") // I commented out this line and this line is definitely the problem.
call SetPlayerAbilityAvailable(GetOwningPlayer(d.u), 039;A016039;, false)
call SetUnitPathing(d.u, false)
call d.destroy()
return true
endfunction
function UnitDelayedMeld takes unit u, real delay returns nothing
local DMS d = DMS.create()
set d.u = u
call KT_Add(function Fade,d,delay)
endfunction
endlibrary
heres one example that USED to work, basically it just waits a specified time and orders the unit to WW.
when i click ww on the unit however, it does not interrupt the order.