Skip to reading
PCA Script Programming

get_included_variable()

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
On this page
Code example
get_included_variable(script, name, fallback = null)

Read the router’s per-script shared-variable dictionary.

Returns: Value or fallback.

Code example
get_included_variable("utility_pca", "last_total", 0)

This store is separate from declarations in that script. It is session/cache state, not automatic save-game state.

set_included_variable()#

Code example
set_included_variable(script, name, value)

Write to the router’s per-script shared-variable dictionary.

Returns: Boolean; requires an existing script ID and a nonempty name.

Code example
set_included_variable("utility_pca", "last_total", 15)

run_visual_graph()#

Code example
run_visual_graph(graph, context = {})

Execute graph data through the visual runtime.

Returns: The visual graph’s returned value, where provided.

Code example
run_visual_graph({"nodes": [], "connections": []})

The first argument is a graph dictionary, not a visual-script ID. Prefer run visual script / the script router for a saved record.

Page 69 of 357Permalink
Go to page