Widget vs PassageReady/PassageDone

0 votes
asked Jun 6 by ZtP (220 points)
Hey all,

Short version: is there s technical difference between updating a set of variables through a widget or in a PassageReady passage?

Long version: In my WIP, the player character can change appearance a lot, up to and including gender, through the choices they make. I'd like to keep descriptions (pronouns, text distributions, etc) updated throughout so they're accurate in conversations and when the player looks at him/herself. Right now, I have them listed in a PassageReady passage, but reverse engineering another project brought to attention using widgets for the same effect. To me, it looks like I would be typing <<pronoun>> instead of $pronoun in text.

Is there any real difference mechanically/technically to do one or the other?

1 Answer

0 votes
answered Jun 7 by greyelf (88,790 points)
selected Jun 7 by ZtP
Best answer

By default the contents of the PassageReady special passage only gets processed a single time for each Passage Transition.

Where as the contents of a <<widget>> gets execute each time you call it, which can be as many times as you want within a Passage Transition, and it can also be called from an interactive element (like a <<link>> that doesn't result in a Passage Transition)

In your use-case this allows for the displayed data to be updated/refreshed without the need of a Passage Transition.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.