Skip to reading
Visual Scripting in Depth

Appendix F. A complete small graph

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

This is a complete Visual Script record for the first message. It is a reference for the structure seen in Raw JSON. It belongs in a Visual Script record, not over the whole .pca3d project file.

Code example
{
  "id":"first_message", "name":"First Message",
  "nodes":[
    {"id":"start", "type":"OnInteract", "x":40, "y":60,
     "data":{"verb":"use"}},
    {"id":"message", "type":"ShowMessage", "x":460, "y":60,
     "data":{"text":"The switch clicks.", "duration":1.8,
             "typewriter":false}},
    {"id":"finish", "type":"End", "x":880, "y":60,
     "data":{}}
  ],
  "edges":[
    {"from":"start", "out":"next", "to":"message", "in":"flow"},
    {"from":"message", "out":"next", "to":"finish", "in":"flow"}
  ]
}

nodes contains the entry, action and ending. edges records each wire’s source, named output and destination. x/y are editor positions. The data dictionary contains the action fields.

If you adapt this for a differently named existing record, preserve its correct record ID and dictionary identity. Normal palette authoring is the safer route while you are learning.

Page 79 of 93Permalink
Go to page