LarryG on 6/9/2014 at 13:58
If you know any way to clear the player's 'current item' selection after a tool use, I would love to hear it. Using CommandControl with clear_item was my best bet, but the script doesn't support that Dark command. Which is odd, as you bind it to backspace, so it should be available in game mode.
Edit: I also tried the Deselect flag on Engine Features > FrobInfo > Tool Action, but that flag has no noticeable effect.
R Soul on 6/9/2014 at 20:18
The problem might be a combination of two things. You're still holding the Use button when the command is run, and another object (the tool's target) is highlighted. I just tested with a simple button CD linked to a trap and it didn't work when I used the button, but it did work when I highlighted the button but then used the game mode command box.
Try a short delay before triggering the trap.
LarryG on 6/9/2014 at 22:47
Solved! The solution to getting a tool to be automatically deselected is:
* to load both NVScripts and tnhScripts
* have the following on the tool archetype
* S>Scripts: {NVRelayTrap; CommandControl}
* Editor > Design Note: NVRelayTrapOn="FrobToolEnd"; NVRelayTrapOff="Null"; NVRelayTrapTDest="[Me]"; NVRelayTrapOnDelay=500; on="clear_item; clear_item";
The non-intuitive part is the need to deselect the tool twice, once to get it out of the tool use position and once to actually deselect it. A slight delay is also needed between receiving the "FrobToolEnd" and sending the "TurnOn". I like a half second delay. It is aesthetically pleasing.
Thanks to all who helped me figure this out!