I'm new to both twine and programming and google is turning up nothing (Not even really sure I asked the right question), so I'll just ask a yes no question.
Lets say I have 4 passages (representing a hallway) and you can move north and south through these. In the furthest north passage there's someone to talk to. You then go south and for whatever reason you end up going north again.
Is it possible that once you get back to the furthest north passage the person says something else or there is someone different entirely? Almost like the passage has been replaced?
I understand I could just create a new passage for this, but I want some things in the game to move at their own pace separate to the main story as the player chooses to engage them.
Kind of like sidequests
The only way I can figure out to do this currently would be with lots of passages that would be really messy and difficult to try to navigate through.
Comments
You can use variables to track what is happening in your story, you can also base what happens on the values stored within those variables.
eg.
You could use a variable to track if the Reader chose to speak to the person in the room, and then use the value stored in the variable to conditionally change what is shown to the Reader the next time they visit the same room.
1. Use a (set:) macro to initialise the variable within your story's startup tagged passage.
2. The following uses an (if:) macro to check the current value of the variable, it uses a (link:) macro to implement speaking to person, and it uses a (go-to:) macro to move the Reader to another passage containing the dialogue.
I'd like to stick with sugarcube as I do intend to learn some programming
1. Use a <<set>> macro to initialise the variable within your story's StoryInit special passage.
2. Use an <<if>> macro and a Setter Markup Link in your passage. ... instead of a Setter Markup Link you could also uses a <<click>> macro like the following: