see if new command is cloak command (= CMD.CLOAK) AllowCommand(), dont forgett to return true as not to accidently cancel the order
see if commander is currently reclaiming GetUnitCommands
use GiveOrderToUnit with CMD.REMOVE cancel reclaim
something like this?
I did it in UnitCommand callin instead, check if command is cloak command and if unit is commander.
However, there is no difference between cloak and decloak command it seems. You can't just check if unit is already cloaked, because there could be situations when the cloak command is issued but not yet active, for example if you just gave the order or if the unit is busy doing something. Because I don't wanna cancel orders on a decloak command too.
Otherwise I got it working by giving the CMD.STOP unless the active command is move, capture or self-d (things that don't decloak).
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
wait wait what? commanders can shot/build/reclaim while cloaked? i thought that was not possible. not because of input/orders but because it was "not possible in the game world." if you can really do stuff while cloaked, it should always be like that. (by gadget if need be)
No, he can't build or do stuff while cloaked (only thing he can do is move or capture I think, and self-d). But if the commander is building an energy storage and is attacked by some nasty passion fruits, then you may want him to cloak before he has completed the construction, by just pressing "k".
That's what the widget does, it puts the construction on wait and cloaks the commander. It doesnt stop the whole queue; in case you had a long list queued you can just press "w" to cancel the wait (and cloak) and resume construction.
Last edited by Jools on 13 Aug 2011, 00:55, edited 1 time in total.
After a certain game phase I often have my com permanently set to "cloak: on".
I think I personally would disbale this widget, more out of the habit of disliking "interfering" widgets directly ordering my units to do stuff than any concrete objection (I can see it being mildly irritating at worst).
What I think is a much bigger issue, in terms of accidental com decloak, is right clicking to move and accidently reclaiming: I'm pretty sure somebody made a thread or a widget or something along the lines of block com right click reclaim commands entirely, so this may be a redundant complaint.
Also, in other TA mods, units default to hold fire as soon as cloak:on is pushed, I presume this is implimented as a gadget, if so it could be worth using.
I think I personally would disbale this widget, more out of the habit of disliking "interfering" widgets directly ordering my units to do stuff than any concrete objection (I can see it being mildly irritating at worst). /offtopic ramble
I can understand that objection, but I made this widget for myself and decided to share it; after all the user interface preferences are subjective, and this widget is not for everybody.
About those other requests: there are widgets for them. Knorke made the disable right click reclaim, and I use a widget that sets hold fire on cloak. But the most important widget imo is the one that makes escape key deselect all units and exit all menues, because I use esc a lot to exit stuff.
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum