Skip to reading
Visual Scripting in Depth

Appendix B. Expressions and call data

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page
Source table from Appendix B. Expressions and call data, page 75
JSONMeaning
{"$var":"score"}Read runtime variable.
{"$context":"entityId"}Read the exact event field.
{"$this":"id"}Read captured caller ID.
{"$this":"name"}Read caller property.
{"$param":"amount"}Read named visual-function parameter.
{"$arg":0}Read positional argument zero.

These special one-key dictionaries can be nested in arrays or dictionaries. Ordinary strings stay strings. No arithmetic formula parser is implied by the lookup syntax.

Code example
{
  "type":"CallScriptFunction",
  "functionKey":"visualScripts/visual_tools/award",
  "parameters":{"amount":{"$var":"pulse_count"}},
  "resultVariable":"result_value"
}

That object is one action, suitable as action data in the corresponding context. It is not a whole project or graph. In an actual visual node, the type is on the node and the remaining fields belong in its data.

An entity-typed function parameter containing this resolves to the owner. A string parameter containing the same word remains ordinary text. Type and target context matter.

Page 75 of 93Permalink
Go to page