Page 1 of 1

[Java] Clear factory build queue [solved]

Posted: 16 Dec 2015, 22:24
by DeinFreund
Is there a simple way to clear the build queue of a factory?
I have tried unit.stop() with no success.

Code: Select all

List<Float> cmds;//contains CommandIDs(=negative unit def id) of units in queue
getUnit().executeCustomCommand(2, cmds, 64, frame + 50)
doesn't seem to work either.
2 indicates CMD_REMOVE, 64 stands for CONTROL_KEY.

Any suggestions?

Also storing command ids as float doesn't seem to make much sense to me. Is there any alternative way of issuing custom commands?

Re: [Java] Clear factory build queue

Posted: 16 Dec 2015, 23:57
by 8611z
commands work same as for humans, so instead of ctrl-modifier try right mouse-button-modifier to reduce queue.
Then spam right-clicks on all buildoptions. (bit stupid, but iirc that worked)

Re: [Java] Clear factory build queue

Posted: 17 Dec 2015, 00:11
by DeinFreund
Thanks for the quick response. Although replacing 64 with 16(RMB) doesn't alter the queue :/

Edit: After using 255 (all possible modifier keys mashed at once) it worked :D

Re: [Java] Clear factory build queue [solved]

Posted: 21 Dec 2015, 16:25
by aeonios
for CMD_REMOVE you have to use options.alt in order for it to interpret params as command ids.

Re: [Java] Clear factory build queue [solved]

Posted: 29 Dec 2015, 02:21
by lamer
From what i see alt and control should be sufficient, e.g. 192 (tested)

Code: Select all

getUnit().executeCustomCommand(2, cmds, 192, frame + 50)