Skip to reading
The Variable Designer

7. Store a list in an Array

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

An Array is an ordered list stored in one variable. It is useful for discovered clues, a sequence entered into a puzzle or choices collected during a conversation. Each entry is a separate member of the list.

1. Add clues, Name Clue List, with Value Type Array.

2. Keep Leave Blank At Start off.

3. Enter ["clock diagram"] in Initial Array Value.

4. Apply and save. Use [] instead if the player should begin with no clues.

Figure 7. The list begins with one String member: clock diagram. Square brackets identify a JSON array.

Add one clue during play#

Use Change Variable, choose clues, set Operation to append, and supply "winding socket" as the Value in the action-list editor. The resulting list is ["clock diagram", "winding socket"]. You are adding one new member, rather than replacing the whole list.

Source table from 7. Store a list in an Array, page 11
OperationResult
Set to []Clears the list.
Append "winding socket"Adds that one String to the end.
Append the same clue againAdds another copy; duplicates are allowed.
Append ["note", "key"]Adds one nested Array, not two separate members.

A clue name in this list is just data. It does not create an inventory item. Use the inventory actions when the player should actually receive or lose something.

Page 11 of 37Permalink
Go to page