User Tools

Site Tools


choice

This is an old revision of the document!


<<choice>>

The «choice» macro produces passage links which can only be clicked once. If one is clicked, all other «choice» links in the passage are permanently disabled. This means that if you return to the passage (via another link) then every «choice» link is darkened and no longer clickable. Normal links are, of course, unaffected.

In Jonah, if the “Undo” StorySetting is off, then all links will behave like «choice» links, and the macro is unnecessary. This is because Jonah permits you to “undo” your moves at any time by scrolling up to a previous passage and clicking another link - undos in Jonah are disabled by forbidding this action.

Usage

<<choice [[link syntax]]>>

You can insert any valid form of the link syntax into the macro - one with expressions, one that sets variables, or anything else.

There is also an older formulation, used in Twine 1.3.5:

<<choice “passage name” “link text”>>

This formulation is no longer recommended, as it conflicts with the link text and passage name ordering used by the normal link syntax.

CSS hooks

The «choice» links have, in addition to their normal CSS classes, the class “choice”.

choice.1403763718.txt.gz · Last modified: 2017/10/10 00:37 (external edit)