Skip to reading
Buttons, Labels & Text Boxes

Connect and test the name button

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

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.

Source table from Connect and test the name button, page 28
Try thisExpected result
An ordinary nameVisitor changes and the confirmation appears.
Outside spaces around a nameThe stored name omits those outside spaces.
An empty field or only spacesThe script asks for a name and keeps the previous stored value.
A long nameThe value can be stored; check that the output label has enough room.
Typing without pressing the buttonThe 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.

Page 28 of 46Permalink
Go to page