Clicking and Not Clicking

0 votes
asked Dec 13, 2017 by piearty (190 points)
edited Dec 13, 2017 by piearty

I'm having people playtest a game I'm making. This game has an inventory system that allows one to look at individual object descriptions in separate passages, then go back to the passage they were at previously. A lot of these passages have a lot of hidden text that's revealed through (linkreveal:) and (click: ?hook) macros. When you visit an object's description and go back to the passages with hidden text, the text is re-hidden. A good number of people have made comments that this is annoying, because then they have to click through all the text again.

I'm wondering of a good way to like...nullify the macros when they've already been clicked. Perhaps there's a really obvious macro I missed? The only thing I can think of is something like...

(in startup)

(set: $isClicked to false)

(in passage)

This is some text with (if: $isClicked is false)[(set: $isClicked to true)(link-reveal: "hidden text")[ that reveals an [[Item]]]](else:)[hidden text that reveals an [[Item]].]

This seems...really clunky and repetitive though so I'm sure there's a better way! I haven't quite wrapped my head around the changes that were made for Harlowe 2 (lambdas, temporary variables, (for:), etc) so I'm probably missing something!

Also this is what I'm using in the Item passage to go back:

(link-goto: "Back to what you were doing.", (history:)'s last)

 

1 Answer

0 votes
answered May 7 by Deadshot (3,410 points)
i can't think of anything other than your 'clunky' method which seems to be fine. why not just use that?
commented May 8 by greyelf (97,410 points)

note: The correct syntax for checking if a Boolean variable has been set to true or false is:

(if: $variable)[The variable equals true!]

(if: not $variable)[The variable equals false!]

 

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...