Using a link that sets a switch to save on page count. [Harlow]

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.

You can use the (link-reveal-goto:) macro to show a link that when selected firsts processes the content of its associated hook before transitioning to a Passage.

(link-reveal-goto: "Link Text", "Target Passage Name")[(set: $variable to "value")]

You could use a single variable that is assigned one of three values to indicate which entry method was used to gain access to the new room.

(set: $entryMethod to "")

(link-reveal-goto: "Break Down the door", "Through the Door")[(set: $entryMethod to "break")]
(link-reveal-goto: "Unlock door", "Through the Door")[(set: $entryMethod to "key")]
(link-reveal-goto: "Pick the lock", "Through the Door")[(set: $entryMethod to "lockpick")]

You can use a sequence of (if:) and (else-if:) macros within your Through the Door Passage to determine what ‘entry’ message to show based on the current value of the variable.

{
(if: $entryMethod is "break")[You bash the door down, then enter the next room.]
(else-if: $entryMethod is "key")[You use the small key to unlock the door, then enter the next room]
(else-if: $entryMethod is "lockpick")[You skillfully pick the lock, then enter the next room]
}\
...more story blah blah...

note: Obviously you should name the story variable and the associated values whatever makes sense for you & your project.

Thanks so much! Knew there was an easy way to do this but simply couldn’t figure it out.