Howdy, Stranger!

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

How do you make a toggle between two states?

edited June 2015 in Help! with 2.0
Remember how Porpentine's "With Those We Love Alive" let you click a word on the screen, then it became a second word, then a third word, until you found the one you liked?

Could someone recommend a good way way to do that in Twine 2.0 Harlowe? I have regular in-page clicks down but I wonder what the best way is to make something permanently clickable even after you have clicked it and made something happen.

I found this but wonder if there is easier syntax. Also when I tried it, it threw a "(print:) macro needs 1 more value" error.

https://gist.github.com/s2tephen/459de15106f66ce67e53

Comments

  • Another example of a cycling link can be found here.

    Because Sensor Macros like (click:) are designed to be single use only you have to re-attache the sensor for it to be become click-able again.
  • Thanks, I'm going to try this.

    Newbie question, but: If we could somehow figure out how to condense a cycling link into a single macro, like (cycle:), would the pull request be welcome on Bit Bucket? Or is that just not a good idea?
  • Thanks, I'm going to try this.

    Newbie question, but: If we could somehow figure out how to condense a cycling link into a single macro, like (cycle:), would the pull request be welcome on Bit Bucket? Or is that just not a good idea?


    something like (cycle:) could be useful, though also if (click:) and ?hookNames were not a one-use-only thing, that would also be helpful

  • I would suggest PMing Leon and talking to him about his plans and if he will accept pull requests for Harlowe.
  • edited June 2015
    something like (cycle:) could be useful, though also if (click:) and ?hookNames were not a one-use-only thing, that would also be helpful

    Yeah, that is a good point. What if there was just a variant of (click:) that kept the click permanent instead of one-shot? Like (click-keep:). It would make so many things easy.
Sign In or Register to comment.