I am currently making my first script which would have bombers (actually units from a list) attack their assigned target once and then remove it from their command que so that they will then continue on an egress path planned presumably to avoid enemy AA.
My question is, is it possible to remove a command from a units command que or do I have to simply recreate the command que less the current command?
EmMeister
Removing a command from a unit's command que
Moderator: Moderators
But not for long ... 
Upcoming commit:
To get this working, I had to add command "tags", to uniquely
identify every command that gets inserted into a unit's command
queue (or build queue or new unit command queue for factories).
CMD_INSERT
- insert by position (negative numbers to reference the back of the queue)
- insert before or after a tagged command
CMD_REMOVE
- remove all commands with a specific id (ex: remove all peewee builds)
- remove by command tag (multiple tags in a single command)

Upcoming commit:
Code: Select all
* Added the CMD_INSERT and CMD_REMOVE commands
(these can use the command tags, positions, and types)
identify every command that gets inserted into a unit's command
queue (or build queue or new unit command queue for factories).
CMD_INSERT
- insert by position (negative numbers to reference the back of the queue)
- insert before or after a tagged command
CMD_REMOVE
- remove all commands with a specific id (ex: remove all peewee builds)
- remove by command tag (multiple tags in a single command)
Last edited by trepan on 18 Mar 2007, 11:58, edited 2 times in total.
Subject to change:
id = CMD_INSERT
options.ALT -> treat param0 as a position instead of a tag
options.CONTROL -> use the build queue for factories
params[0] = position or command tag
params[1] = insertCmd id
params[2] = insertCmd options
params[3 ... N+2] = insertCmd params[0 ... N-1]
id = CMD_REMOVE
options.ALT -> use the parameters as commandIDs
options.CONTROL -> use the build queue for factories
params[0 ... N-1] = tags or commandIDs to remove
id = CMD_INSERT
options.ALT -> treat param0 as a position instead of a tag
options.CONTROL -> use the build queue for factories
params[0] = position or command tag
params[1] = insertCmd id
params[2] = insertCmd options
params[3 ... N+2] = insertCmd params[0 ... N-1]
id = CMD_REMOVE
options.ALT -> use the parameters as commandIDs
options.CONTROL -> use the build queue for factories
params[0 ... N-1] = tags or commandIDs to remove
Last edited by trepan on 15 Aug 2007, 05:59, edited 1 time in total.
That could already be done, this just makes it easier/cheaper.
http://spring.clan-sy.com/phpbb/viewtop ... =dragndrop
http://spring.clan-sy.com/phpbb/viewtop ... =dragndrop