Hello! I am new to Twine, so this is probably a bit of a stupid question. I am keeping track of time in my game using a variable that goes from 0 to 239. The ones place keeps track of each tenth of an hour while the tens and hundreds place keeps track of hours. I want to have a script that sets time to 0 every time it's greater than 239. I don't want to have to use an if statement for this in every single passage, so I'd like some script that runs every time you move onto a new passage. If there's a better way for me to keep track of time please let me know!
Thanks!
Comments
You can use the built in prerender and postrender events to do what you want.
Information for the built-in story formats can be found here, and SugarCube's documentation is here. SugarCube also has special PassageDone & PassageReady passages which can also be used.