- Joined
- Nov 22, 2006
- Messages
- 1,260
Hi, I wanted to disable the movement of a certain unit......but that unit is still moving normally. I just know there's a catch somewhere.....
F is just a global variable (in vJass you don't have to add udg_s).
Well, 'nuff said, any ideas?
JASS:
function MovementDisable_Conditions takes nothing returns boolean
return GetIssuedOrderId() == OrderId("smart")
endfunction
function MovementDisable_Actions takes nothing returns nothing
call IssueImmediateOrder(F, "stop")
endfunction
//===========================================================================
function InitTrig_Movement_Disable takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent(t, F, EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(t, F, EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(t, Condition(function MovementDisable_Conditions))
call TriggerAddAction(t, function MovementDisable_Actions)
set t = null
endfunction
F is just a global variable (in vJass you don't have to add udg_s).
Well, 'nuff said, any ideas?