Problem:
Is there a way to have a link also set a switch before arriving at its destination. For example, say a user can get throw a door by using a key, breaking the door down, or picking a lock. Each choice has the same effect but with different results and consequences going forward. Therefore, I am tempted to make a page that is “Decide how to open the door” and another that is “Through the door” and have all three results on the same page but use a IF true switch to determine which text is displayed. This saves on over all page count and makes the story visually easier to write for me, especially if there would otherwise be multiple branches that then return to some of the same areas.
I have found that I can accomplish this with a link and then putting the switch toggle in the post click text. For example:
(LINK: "Break Down the Door ")[You bash the door down. [[Go through the door.|Through the Door.]] (set: $breakdoor to true) ]
But there are two problems with this approach: If the player clicks one link (say, “Break Down the Door”), then clicks on another (“use the key”) they could turn on multiple switches and have text displayed multiple times. If I control for that by having each Link turn off the other two switches when clicked on, then they could still open a link, then chose to go to the other choice (IE, click all three links to see what the text hidden by them says, then choose which one they wanted which would instead only give the third hidden link’s switch.)
Is there any way around this? Like a Link that sets a switch and then immediately sends the user to the next page?
What I’m Using and Why I am asking:
Using Twine in Harlow (with the “Use it Online” feature off the Twinery Website) and am wondering about a way to save page count. Why do I want to save page count? Clearing visual clutter and making it easier to organize multiple branches from a single event.
Thanks for any assistance.