-
Notifications
You must be signed in to change notification settings - Fork 11
Twine Nodes
-
TODO Write and link to article on adding
Associated Twine Nodes
component. - TODO Images for decision nodes.
Once Twine is imported into Unity, a Twine graph is stored as an asset named after your Twine story (so if your story was named "Life at the Workhouse", the asset will be named "Life at the Workhouse - Twine" in Unity).
This asset will go into the Assets
folder by default (for more information on where this asset could go, read about importing Twine data into Unity. The story object is made up of several objects known as Twine Nodes
, which each correspond to a node, or event, in your Twine story.
Note: Each node holds important data relevant to the Twine story, and shouldn't be edited by hand!
We'll use the story object and its nodes to connect the story we made in Twine to the Unity game.
All of the Twine Nodes will sit (invisibly) in your story, with one node activated at any time. The activated node represents the part of the story that the player is currently in. As you progress through the story, a node that follows the currently activated node will become active (and the previous node will de-activate), and so on.
There are two ways to activate a successor Twine Node and thus progress your story:
- Trigger the next step in a story through an interaction with an object in the world.
- Trigger the next step in a story through a decision that the player makes.
In either case, you must add an Associated Twine Nodes
component to your object (see tutorial here) TODO: WRITE AND LINK TUTORIAL) to associate one or more Twine Nodes with a component.
To trigger a Twine progression through an interaction, simply attach an interaction to a component with some Associated Twine Nodes. When the interaction is triggered, the associated Twine node that is a child of the currently activated Twine node will activate (if such a Twine node is associated with the object).
To trigger a Twine progression through an internal decision that the player makes, go to the Twine node where this decision will take place and designate it as a "decision node" by checking the "Decision node" checkbox. TODO: Images for this process!