0 votes
by (170 points)
Hi everyone! So I've been searching for a while and couldn't find the answer to my question. Either it doesn't fit what I want or it's in Harlowe.

Anyway, my conundrum is; I have a user who picked between 3 different option (A,B & C) and later down the line I want to change the text of a paragraph BASED on the options he picked.

Example

Protagonist makes a phone call, and choose between saying "Hey" "Hi" or "Sup", and further down in the story the person they were calling calls back and replies in accordance to what was previously chosen.

I know this must be SUPER easy for someone but I'm still in the "no-longer-a-noob-or-novice-but-still-feeling-my-way-around-things" stage of Twine.

Thanks in advance!

1 Answer

+1 vote
by (2.7k points)

Hi Iza,

if the call-back may happen in an different passage, then this could be a step towards solution:

Passage Start:

Protagonist makes a phone call and says 
"<<link "Hey">><<set $call to "w1">><</link>>" or "<<link "Hi">><<set $call to "w2">><</link>>" or "<<link "Sup">><<set $call to "w3">><</link>>"

... some other text ...

[[NextPassage]]

 

Passage NextPassage:

Later that day, a call came in. Protagonist took the phone: 
"Hello?".
From the other side, Protagonist hears:
<<switch $call>>
<<case "w1">>
   "Hello, my friend, you don't know me, but listen carefully ...."
<<case "w2">>
   "Darling, you won't forget to buy the meat for this evening, will you?"
<<case "w3">>
   "Police departement calling. Inspector Henderson here. Did you receive an unusual phone call this afternoon?"
<</switch>>

... How will the  story go on ...

This is my first try with sugarcube, so this solution might be the worse, but anyway, it looks like it is working. I would expect that one could <<include>> whole passages instead of writing 'case' the sentences down right there.

If you meant to display the different text variants to display on the same passage - immediately after choosing what to say - then there must be found a binding between "show/display text" and the triggering link. 

 

by (170 points)

Jherek, THANK YOU SO MUCH!

I had to adjust it slightly though to something like this;

Protagonist makes a phone call and says 

<<link [["Hey"|Next Passage]]>><<set $call to "w1">><</link>> or

<<link [["Hi"|Next Passage]]>><<set $call to "w2">><</link>> or

<<link [["Sup"|Next Passage]]>><<set $call to "w3">><</link>>

... some other text ...

But it works PERFECTLY now! You just saved 50(ish)% of my game! Again, THANK YOU!

by (2.7k points)
Cool, You are welcome, Iza.

Don't hesitate to ask, if the other 50% come up with an adventure, too :-)

Greetings
...