10. Add a complete custom command
On this page
Share the same response with mouse controls#
The parser does not need a private copy of the clock's Wind actions. A GUI button with the action verb:wind, followed by the clock in Verb Single Click mode, can reach the same verb response.
This is a useful check: if a normal Wind interaction works and typed Wind fails, investigate the typed vocabulary and input connection. If both fail, inspect the target's actions and interaction settings.
The walkthrough uses Verb Single Click for this straightforward comparison. Context, Direct and Verb Direct have different mouse and inventory selection rules. Typed commands share interaction code, so test the mode your finished game will actually use.
Stop a one-time action from repeating#
Setting a Boolean to True a second time does not automatically create a different response. If the clock should only be wound once, add an If Variable check before the actions. When clock_wound is False, wind it and set the variable. When it is True, show The clock is already running.
Use the same condition for mouse and typed interactions by keeping it in the clock's response. That way the puzzle behaves consistently whichever input the player chooses.
A custom command connects a complete phrase to a script. The example help gives instructions without asking the player to name an object.
First create the script using Chapter 11 or 12. Then connect it:
1. Open Text Parser.
2. Under Custom Commands, click Add Command.
3. In Command, type help.
4. In Script, select Parser Help(parser_help), or your equivalent script.
5. Click Apply Parser Settings, save and restart the preview.
6. Type help in the game.
