Connect and test the name button
Select the actual Use this name button, not its neighbouring label or text box. Open Events, find Click, choose run-visual-script and enter save_name in Click Target.
Figure 21. The button names the helper script in its Click event. It does not read the input merely because its caption says Use this name.
| Try this | Expected result |
|---|---|
| An ordinary name | Visitor changes and the confirmation appears. |
| Outside spaces around a name | The stored name omits those outside spaces. |
| An empty field or only spaces | The script asks for a name and keeps the previous stored value. |
| A long name | The value can be stored; check that the output label has enough room. |
| Typing without pressing the button | The stored variable does not change yet. |
Keep input collection and game-state changes separate. If you later use the same field to rename a save slot or title a journal note, change the receiving action deliberately rather than assuming the textbox ID decides the destination.
If the script runs but reads an empty String, check the GUI ID, element ID, that the field is still present, and whether Clear on Enter emptied it before the button read it.
