Page 1 of 1

Order Guard for constructor

Posted: 01 Oct 2013, 10:59
by Broker
Hi all.

How I can understand the difference in the situations?

first - i give order fight to constructor near factory and unit start help build units factory with out may help.

second: i give order guard factory to constructor and unit start help build units factory directly.

how i can understand with order constructor received.

I want to split constructors. some assist with fight order and another assist with guard order.

may be this:
first

[code]
local cQueue = Spring.GetCommandQueue(unitID)
if (cQueue[1].id==CMD.FIGHT or cQueue[1].id==CMD.REPAIR or cQueue[1].id==CMD.RECLAIM) then

[/code]

second :

[code]
local cQueue = Spring.GetCommandQueue(unitID)

if (cQueue[1].id==CMD.FIGHT or cQueue[1].id==CMD.REPAIR or cQueue[1].id==CMD.RECLAIM) and cQueue[2].id==CMD_GUARD then return true
[/code]

Re: Order Guard for constructor

Posted: 03 Oct 2013, 08:12
by Google_Frog
Echo the command queue in various situations to build up your knowledge. CMDTYPE.INTERAL (or something like that) may be useful.