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]
Order Guard for constructor
Moderator: Moderators
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Order Guard for constructor
Echo the command queue in various situations to build up your knowledge. CMDTYPE.INTERAL (or something like that) may be useful.