Skip to reading
Buttons, Labels & Text Boxes

Check the solved state and the reward

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

Figure 23. The correct answer updates the feedback and objective. One earlier test point plus the five-point reward gives a score of 6.0.

Source table from Check the solved state and the reward, page 31
TestExpected result
WRONGNo reward; feedback asks for the correct word.
clock with outside spacesAccepted after trimming and uppercasing.
Correct answer onceregister_open becomes true and five points are added.
Call check_answer againThe existing true flag prevents another reward.
Start a fresh gameStarting variables return to the authored defaults.

For an actual room puzzle, replace or extend the successful actions with the change you need: show a clue GUI, change a room object, play a sound or start a conversation. Keep the flag check before the reward.

When loading a saved game, restore presentation from the saved flag as part of opening the panel. A Boolean saved in game state is more dependable than treating the last control's enabled/disabled appearance as the only record of a solved puzzle.

Use the same condition in a visual action list when its data is already in variables. Reading free text into that state is the small script bridge demonstrated here.

Page 31 of 46Permalink
Go to page