The Indirect Reference syntax allows fields in Story Machine to refer to data stored in some other system, such as a list or text database.

Syntax

Indirect references must match one of the following patterns:

  • list: listName[row][column] Reference a cell (at row, column) of the list named listName. Note that row and column can be index numbers or variables representing index numbers. The column field can additionally be the name of the column in the list.
  • text: textKey Referece a entry in the Text Database. The result will be the text associated with textKey.

Usage

Indirect references can be used in any action or component field that accepts an asset reference or text key. Indirect references can also be used in text strings with the tag.

An example of using an indirect text reference with a file path.

In this example, the Replace Image action will replace the specified image with the file at path “text: Indirect Image”. By checking the Text Database, we can see that “Indirect Image” has been defined as a text key that refers to a picture of a Space Gorilla. When Replace Image runs, it will use the path to the Space Gorilla as its replacement file path.

An of list indirection

In this example, the text of a text box is being set to the contents of a list named “text list”. Specifically, it is being set to the value at row 1, column 1, which, as shown in the List Editor window, is the text key “Castle”. When the Set Text action runs, it will find the text associated with the key “Castle” in the text database and insert it into the text field.