Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Is there an easy way to remove links after you click them?

Basically I'm trying to create a scene where you explore an apartment by looking in each room and while in each room get the option to look closer to at objects of interests before continuing exploring.
Typically text adventure stuff, really

What I don't want is the typical hassle of the player having to click through several rooms to get from point A to point B. (even though that's how we roll it in RL.) Nor do I want the player to be able to explore the same room again and again even though nothing new has been added between times. Or the bother of adding; "you've already looked at that" to stuff.

So instead I just want to provide a point in the story where the player get the option to choose what room to explore(a single reoccurring passage in Twine). And I want to the link for each option to disappear after it has been clicked.

Now I know how to do it with just adding new passages. But that's messy and cumbersome.

And I figured out how to do it with the (if:) macro.
(Admittedly, it took me a while to figure out that if I set the variable in the same passage as the (if:) macro then even if I later change the variable in another passage once I go back to the first passage the variable will just be reset.)
But it requires fiddling with variables and commands over at least 2 passages.


So I'm wondering if there some quicker way to do this? Maybe there is a command or macro that directly do it?

Comments

  • Your two simplest methods for tracking the Reader's choices and if they have visited a passage or not are:

    1. Variables: (which you worked out yourself)

    2. The (history: ) macro:

    There are two main issues with the second option:

    a. Each time the Reader visits a passage it's name is added to the array returned by the macro, and the larger the array gets the longer it takes to search through the entire array looking for the passage name you are interested in.

    b. Because you want to search for multiple names, one for each option you want to conditionally show in this options passage, you will need to search the entire array multiple times each time this option passage is shown.
  • So in other words no macro that hides/removes a link after it been used.

    Wonder if that is a feature more people than I would be interested in.
  • edited June 2016
    The problem with making such a macro is that in order to work you'd still need to do what greyelf said. There's absolutely no way an automated macro can remove a link without referencing the history. Otherwise, how does it know that passage has been visited before?

    So in essence it's just duplicating functionality in a different style.

    The variables approach will generally always be superior for this sort of thing due to the performance drain of history.
Sign In or Register to comment.