CMD.REMOVE question

CMD.REMOVE question

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
troycheek
Posts: 80
Joined: 22 May 2009, 19:13

CMD.REMOVE question

Post by troycheek »

Let's say I have a builder who is building something, with several other build orders queued up, and I wish to remove one of the later orders from within my widget. I can do so with Spring.GiveOrderToUnit(unitID, CMD.REMOVE, { cmd.tag }, {} ). However, the builder will stop building then start again each time I do so. Some units take a bit of time to store and redeploy their nanolathes, so this can really add to the build time if remove several orders in rapid succession. Any way I can remove orders without using CMD.REMOVE?

(A short time later...)

And to answer my own question, it's simply the matter of giving the unit the same build order again with Spring.GiveOrderToUnit(unitID, cmd.id, { cmd.params }, { "shift" }).
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: CMD.REMOVE question

Post by lurker »

Even if you have a workaround, you should file a bug report on that.
User avatar
troycheek
Posts: 80
Joined: 22 May 2009, 19:13

Re: CMD.REMOVE question

Post by troycheek »

Submitted. http://springrts.com/mantis/view.php?id=1476 I didn't consider submitting it before because I just assumed that this was either the intended result or I was simply doing something wrong. Actually, I was leaning waaaay towards me doing something wrong.
Post Reply

Return to “Lua Scripts”