Skip to reading
The Variable Designer

20. Find the cause when a value is wrong

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 PDF page

Start with the exact ID, the current value and the action that writes it. That is usually faster than changing several settings at once.

Source table from 20. Find the cause when a value is wrong, page 34
What you seeCheck this first
The designer still says False after playIt shows the starting definition. Use get clock_wound in the running preview.
Points rise every time the object is usedThe reward is unconditional, or an old add action remains after the guarded script call.
The second click appears to do nothingWait for the first interaction to finish. A busy interaction can ignore another click.
A condition fails despite the word true showingCheck for the String "true" rather than Boolean true. Displayed text can hide that difference.
A numeric comparison gives an odd resultCheck that both values are numbers. If Compare needs {"$var":"score"}, not the literal String "score".
A GUI shows $$score literallyCheck the ID, spelling and that the record exists. Test in gameplay, not only the authoring canvas.
Array entries have the wrong typesUse valid JSON. The quick separated-list form creates String members.
Appending makes a list inside the listAppend adds one member. An Array operand becomes one nested Array.
A new initial value does not appearApply and save, then test a fresh game. An old save can restore earlier data.
get returns <undefined>Check the ID and whether a loaded save predates that variable.

Change one thing, then run one known test. A label, a fresh get query and a single interaction are enough to narrow down most variable problems.

Page 34 of 37Permalink
Go to page