- Joined
- Mar 25, 2016
- Messages
- 1,327
JASS:
scope OrderTracking initializer Init
private function Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer o = GetIssuedOrderId()
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, GetUnitName(u) + ": " + I2S(o)+" -> "+OrderId2StringBJ(o))
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
Is there a function to convert the unit id into the raw-code? I only get the integer value of the unit type.For example 851983 should also print "attack", and 'hbar' should also print "Barracks"
(I know you could write one, but I doubt that belongs to mission 1)