Twine Integration Conditionally Branch

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
cbmoz
Posts: 2
Joined: Sat Nov 14, 2020 11:15 am

Twine Integration Conditionally Branch

Post by cbmoz »

Hello I am trying to achieve a conditional branch within Twine that I can then import into the Dialogue System,

Code: Select all

(if: $PlayerResponseCold is true)[ [[(Cold)]] ] 
(if: $PlayerResponseWarm is true)[ [[(Warm)]] ]
However when I do the nodes become disconnected upon import into the dialogue system
dialogue.png
dialogue.png (80.4 KiB) Viewed 165 times
Is linking within a (if:) in twine not supported?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Twine Integration Conditionally Branch

Post by Tony Li »

Hi,

You can keep your Harlowe 'if' conditions, but please also state them in Lua in a "Conditions:" section on the node that it should link to. (More info)

For example, on the Cold node, something like:

Code: Select all

As you touch the barrel you feel a chill.
Conditions:
Variable["PlayerResponseCold"] == true
The challenge with Twine is that it's so freeform that this is the best way to structure it for the Dialogue System so that it's not ambiguous.
Post Reply