Sgqvur
FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
- Reaction score
- 62
Is there a trigger that stops a building to train a unit? For example when you order a Barracks to train a footman I want to order the Barracks to stop training it.
call IssueImmediateOrderById(Building,0x000d0008)
//JASS is so much nicer:
function Grab_OrderID takes nothing returns nothing
call DisplayTextToPlayer(GetLocalPlayer(),0,0,I2S((GetIssuedOrderId())))
endfunction
function InitTrig_Grab_OrderID takes nothing returns nothing
set gg_trg_Grab_OrderID=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Grab_OrderID,u,EVENT_UNIT_ISSUED_ORDER)
// u is gg_unit_hbar_0000 which is the barracks
call TriggerAddAction(gg_trg_Grab_OrderID,function Grab_OrderID)
endfunction
call IssueImmediateOrderById(Building,851976)