22. Give Enter one owner
Select text_command and use the following Type Settings. The finished controller receives text_submitted directly and clears the field itself.
| Option | Finished controller value |
|---|---|
| Multiline | Off |
| Clear Single-Line Text When Enter Is Pressed | Off |
| Run Text Parser Command When Enter Is Pressed | Off |
| Return Focus To Text Box After Enter | Off |
Figure 14. For the controller route, all three built-in Enter behaviors are off.
The script connects the field’s text_submitted signal once, calls send, clears the command and restores focus in text-only mode. You do not need an additional Changed event, Enter action or parser action on the field.
Run the game and type LOOK. You should see both > LOOK and a room description in the transcript. Type an unknown command and check that the game gives a helpful reply rather than doing nothing.
If each command appears twice, first check this page. A native parser submission plus a script submission is the usual cause. If nothing happens, check the field ID, the script’s Global setting and compilation errors.
