Hello,
I am learning Twine, new to it. I know some html css js... I am using latest 2.0 build with Harlowe.
I was wondering if it is possible to only display something, when the user has done several other things within that passage, and not before.
In example I would like that, after clicking every link in this passage, no matter in which order, a "next" link would appear, that when clicked would take the user to the next passage.
(link: "Red button.")[red button ON!]
(link: "Green button.")[green button ON!]
(link: "Blue Button.")[blue button ON!]
This way I can force the user to do a series of actions before advancing.
I would like to do this within a single passage code, and not by using several, if possible.
Thank you!
Comments
The (live:) macro is used to check the current value of the variable every half second (*), once the variable is the correct value it will first display the passage link and then stop the (live:) macro using a (stop:) macro.
It is very important to manually stop a (live:) macro once your finished with it, otherwise it will just keep running.
* 1 second equals 1000 milliseconds (ms)
As I understand undeclared variables are set to "0", which means that I do not really need to declare the variable counter, but you are doing this for the sake of clarity, right ?
Thanks again
Yes(ish).
Being an old programmer, experience has taught me to always assign a default value to any variable I use and to not rely on the language/system to do it for me, because you never know if the language/system will be changed to not do it automatically or to default to a different value. lol