How do you link multiple choices to one passage?

I just started testing out twine to make a story and I will like to know how I can link various choices/passages to one passage.

for example:

passage 1: Have 3 choices leading to 3 different scenes/outcomes in the game
Those 3 outcomes end up merging in the same to passage 2: that have 2 choices leading to 2 new outcomes
those 2 outcomes again merge into the same, passage 3. I want this passage to lead to 2 different outcomes / new passages but depending on the choices you had made in the other passages since this passage won’t have any choices.

this screenshot will explain it better than me.

I have added

(set: $seen1 to false)
(set: $seen2 to false)

in the startup story, then proceed to add (set: $seen1 to true) and (set: $seen2 to true)  at the end of the passage choices so that when I put this in the evo passage the game send me to either Lol1 or Lol2 --> 
(if: $seen1 and $seen2)(link-goto: "Lol1")

I have don the same to the variables for lol2, the problem is that the game doesn't continue and neither shows the passage link to the player even if he has chosen those choices...

Sorry if I can’t explain this better :slight_smile:

So, you want to branch and then bottleneck (bottleneck means when you bring multiple passages together into a common one, the opposite of branch) - you should be able to use if-statements to show and hide links to the respective passages. You can also use if-statements and alter the text in the passage that joins to alter it if it needs to make sense based on where the player is coming from.

I might be misunderstanding - in Twine and most choice engines, it shouldn’t be a problem for multiple passages to all lead to one passage, you just link there and use if-statements to hide and show links based on how you need to direct the flow to them.

In AXMA (which is not Twine) there is a “visited” state for passages that can check how many times the player has visited and seen them: <<if visited('passage1') gt 0 and visited('passage2') gt 0>> [show a link]<<else>>[show this other link] - but the syntax is likely specific to your Twine version.

(Someone experienced in Twine will most likely have a specific answer for this and will chime in here.)

1 Like

As show in the (if:) macro’s example you are meant to place that macro’s content within an associated hook.

(if: $seen1 and $seen2)[(link-goto: "Lol1")]

Having multiple links with different Link Texts all target the same Target Passage Name is as simple as…

<!-- Using Markup based links... -->
[[Link Text 1->Target Passage Name]]
[[Link Text 2->Target Passage Name]]

<!-- Using Macro based links... -->
(link-goto: "Link Text 1", "Target Passage Name")
(link-goto: "Link Text 2", "Target Passage Name")

<!-- Using a 'Setter' Link.-->
(link-reveal-goto: "Link Text 1", "Target Passage Name")[(set: $var to 1)]
(link-reveal-goto: "Link Text 2", "Target Passage Name")[(set: $var to 2)]
1 Like

it will certainly be easier if we could just select the passages we want in the game and select in what passage we want it to open a new passage if the player has read the selected passage instead of having to use if: macros. It will certainly be a nice feature to have for rookies like me xD
(like storyboard viget, you can just autolink manually from the app the choices to a passage)

you are not, that is exactly what I want. to do.

so let me see if i did understand it, going by my screenshot i can just do this →

<!-- Using Macro based links... -->
(link-goto: "The new passage", "Can you,Walk inside ")
or atleast target only one passage
(link-goto: "The new passage", "Can you")

the problem here, do macro-based links show the players this link if they have not seen those passages? or I do still have to use them with " if macro."?

thanks for the replies :slight_smile:

The only reason you’d need the if macro is for what you said - you want to base the destination passage on which passages the player has seen.

This is psuedo-code below (just to show structure). In the “response” passage, the player only sees one link via the if-statement based on which passage branch they arrived through. (I’m just using “visited” but please use the relevant Twine macro as applies.)

:passage one

‘Hello, how are you?’ the computer asks.

[I’m good|goodpassage]
[I’m bad|badpassage]

:goodpassage
[“I’m good,” you say.|response]

:badpassage
[“I’m bad,” you say.|response]

:response
“Response recorded,” the computer says.
<if visited goodpassage>
[Take your receipt.|goodreceipt]
<else if visited badpassage>
[Take your receipt.|badreceipt]
<endif>

:goodreceipt
Your receipt says you’re having a good day.

:badreceipt
Your receipt says you’re having an awful day.

You’d probably never do something this ploddingly simple - give a choice and make the player choose the same thing again, but I did that to bottleneck and then gate the two resulting choices based on the player’s visited history.

I find actual reasons all the time to use if-statements and gate choice narratives - say to offer an additional choice if the player’s stats are high enough, or if they’ve already explored another section of the story and I don’t want them to repeat that, I’ll hide those choices.

I will prefer something easier like

(if: $seen1 and $seen2)(link-goto: “The new passage”)
(else:)(link-goto: “The new passage2”)

that way if the player have not chosen the choices to trigger a certain passage he gets other passage instead.
Btw I’m using Harlowe but I don’t mind changing to something else so long is easier for me to make the choices matter, the game I want to make is based on choices only, not stats or other things.

As I stated earlier, you need to use a hook to contain the content you want associated with the (if:) macro…

(if: $seen1 and $seen2)[(link-goto: "The new passage")]
(else:)[(link-goto: "The new passage2")]

… or macros like (else-if:) and (else:) won’t work correctly.

1 Like

I did think the hooks were for choices… I wanted that “if” or “else” command to directly send the player to the passage after reading without the player having to press or see " the new passage2" or “the new passage” as choices, guess I will have to be creative to name them :slight_smile:
thanks for helping.

How would you tell when the player is done reading?

That was what the other part of that answer told you how to do: if you give link-goto two strings, the first one is the text that is shown to the user, and the second is the name of the passage that you’re going to.

1 Like

like this? -->

(if: $seen1 and $seen2)[(link-goto: “Text I want to show”, “The new passage”)]
(else:)[(link-goto: “Text I want to show”, “The new passage2”)]

https://twinery.org/wiki/harlowe:go-to

I don’t want to be that guy, but a lot of answers can be found by just reading the documentation.

Also as Chapel said: Is this what you really want? It will immediately redirect the player to a new page when this page loads. They won’t have time to read anything that’s on it. If that’s a problem, then use the (link-goto:) command answer.

some of those documentation are not very clear or mention how to mix things like “if” or other macros at all and that’s why im asking. I did not know how to mix them at all, not even how to have passages real name’s hidden with some other text etc :+1:

1 Like

To be fair, they’re probably easier to read if you’re already used to reading references in other programming languages. They’re really clear to me now, but maybe they would have been confusing if I had just started learning.

1 Like