- Joined
- Jan 1, 2011
- Messages
- 1,534
JASS:
library OrderTracking initializer Init
private function Action takes nothing returns boolean
local unit u = GetTriggerUnit()
local integer i = GetIssuedOrderId()
local string s = OrderId2StringBJ(i)
if StringLength(s) == 0 then
set s = GetObjectName(i)
endif
call ClearTextMessages()
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Unit ID: " + I2S(GetUnitTypeId(u)) + "
Order ID: " + I2S(i) + "
" + GetUnitName(u) + " ordered to " + s + ".")
set u = null
return false
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t, GetLocalPlayer(), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER, null)
call TriggerRegisterPlayerUnitEvent(t, GetLocalPlayer(), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER, null)
call TriggerRegisterPlayerUnitEvent(t, GetLocalPlayer(), EVENT_PLAYER_UNIT_ISSUED_ORDER, null)
call TriggerAddCondition(t, function Action)
set t = null
endfunction
endlibrary
//Code indented using The_Witcher's Script Language Aligner
//Download the newest version and report bugs at www.hiveworkshop.com
Attachments
Last edited: