Skip to reading
The Variable Designer

11. Watch values during a test

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

Use the runtime preview to check what the game is doing. Variable Designer keeps showing the starting definition; it is not a live values window.

1. Apply the object actions and save the project.

2. Start a fresh preview with Play / Restart, or Test Scene for the room you are working on.

3. Click Show Debug Console below the preview.

4. Enter get clock_wound and submit the command. Before using the clock, the result should be false.

5. Use the clock, then enter get clock_wound, get score and get attempts one at a time.

Figure 14. The console reports score = 10 after the first test. A get command prints a result at the time you submit it.

Source table from 11. Watch values during a test, page 18
Test in the unguarded versionclock_woundscoreattempts
Fresh previewfalse00
Use the clock oncetrue101
Use it a second timetrue202

That second reward is expected in this early version: there is no condition yet. It shows why a stored flag must actually be checked before awarding points. Chapter 12 makes that change.

A console result is not a live watch. If you change a value after asking for it, the old printed result does not update itself. Run get again before deciding that the value is wrong.

Page 18 of 37Permalink
Go to page