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.
(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...
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.)
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)]
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."?
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.
(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.
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
thanks for helping.
That was what the other part of that answer told you how to do: if you give link-gototwo 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.
(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â)]
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
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.