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:
I've made this crazy solution. Giving each hook a double label:
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.
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.