The {set link:}
insert allows you to set variables when a link is clicked, which can allow different link choices leading to the same passage to set different variables.
Note
This is a Chapbook insert.
v2: Add the contents of set-link.js to your story Javascript. v1: Add the contents of set-link-v1.js to your story Javascript.
{set link: "passage name", label: "link text", set: "variable instruction"}
The {set link:}
insert creates a link which, when clicked on, sets one or more variables, as if you had set them in the variables section of a passage.
e.g.
{set link: 'Another passage', label: 'A link', set: 'foo: 2'}
To set multiple variables in one link, you must separate them with ;
marks, e.g.
{set link: 'Another passage', label: 'A link', set: "foo: 2;bar 'text value'"}