- Joined
- Jun 19, 2009
- Messages
- 556
vJASS:
scope Order initializer Init
private function Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer o = GetIssuedOrderId()
call BJDebugMsg(GetUnitName(u))
call BJDebugMsg(I2S(o) + ": " + OrderId2String(o))
endfunction
private function Init takes nothing returns nothing
local trigger trg = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddAction(trg, function Actions)
endfunction
endscope
vJASS:
scope Order initializer Init
private function Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer o = GetIssuedOrderId()
local string n = GetObjectName(o)
call BJDebugMsg(GetUnitName(u))
if(n=="Default string") then
call BJDebugMsg(I2S(o) + ": " + OrderId2String(o))
else
call BJDebugMsg(I2S(o) + ": " + n)
endif
set u = null
endfunction
private function Init takes nothing returns nothing
local trigger trg = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddAction(trg, function Actions)
set trg = null
endfunction
endscope
Attachments
Last edited: