Howdy, Stranger!

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

How to deactivate various hook links at the same time when selecting one of them? (Twine 2, Harlowe)

Hi,

I failed to categorise this as a question, so I made a mistake and I have this questions as a discussion thread here:

https://twinery.org/forum/discussion/6443/how-to-deactivate-hook-links-when-selecting-one-of-them-twine-2-harlowe

That if a moderator could erase I would be grateful.

I'll repeat the question here, I really need help with this:

I'm trying to make a narrative effect when a passage offers several links and when you choose one of them, the other options disappear. I'm talking about hook links, that is, pressing any link will keep the player inside the passage.

I have a solution, but it is not elegant no efficient for the programmer (me).

So, starting with the example of harlowe documentation:
Your [ballroom gown]<c1| is [bright red]<c2| with [silver streaks]<c3|,
and covered in [moonstones]<c4|.

(click: ?c1)[A hand-me-down from your great aunt.]
(click: ?c2)[A garish shade, to your reckoning.]
(click: ?c3)[Only their faint shine keeps them from being seen as grey.]
(click: ?c4)[Dreadfully heavy, they weigh you down and make dancing arduous.]

I've made this crazy solution. Giving each hook a double label:
Your |x1>[[ballroom gown]<c1|] is |x2>[[bright red]<c2|] with |x3>[[silver streaks]<c3|], and covered in |x4>[[moonstones]<c4|].

(click: ?c1)[(replace: ?x1)[ballroom gown](replace: ?x2)[bright red](replace: ?x3)[silver streaks](replace: ?x4)[moonstones]A hand-me-down from your great aunt.]
(click: ?c2)[(replace: ?x1)[ballroom gown](replace: ?x2)[bright red](replace: ?x3)[silver streaks](replace: ?x4)[moonstones]A garish shade, to your reckoning.]
(click: ?c3)[(replace: ?x1)[ballroom gown](replace: ?x2)[bright red](replace: ?x3)[silver streaks](replace: ?x4)[moonstones]Only their faint shine keeps them from being seen as grey.]
(click: ?c4)[(replace: ?x1)[ballroom gown](replace: ?x2)[bright red](replace: ?x3)[silver streaks](replace: ?x4)[moonstones]Dreadfully heavy, they weigh you down and make dancing arduous.]

The rationale behind this is that you can't replace a hook to deactivate a link. If you use (replace: ?c1)[any text here], the ballroom gown link will be replaced for another c1 link with the text "any text here". So it occurred to me to give a wrapping so I could replace the whole link. And it works, but as you can see is ugly as hell.

Any optimal and elegant solution?

Thanks.

Ruber.

Comments

  • Have you considered just having new passages, but copying everything from the previous passage making it look like the same passage?
  • That's an idea!

    I usually like better don't do tricks, but that could work.

    And this gives me more ideas, for example that the whole text is unique hook, and that any of the links replaces all text but its answer.

    I will post further ideas if I try them.
  • I'm glad I could help.
Sign In or Register to comment.