u/FigSenior6879

Having a timer run across multiple passages?

So I'm trying to implement a game-wide countdown timer. The way it would function is the player has 120s to explore, which is tied to a countdown meter from Chapel's meter macro and once those 120s are up, the game will push them forward to a new passage.

<<timed 120s>>

<<goto "between">>

<</timed>>

I originally placed this in PassageFooter, but soon realized that it was only counting down on a given passage. Is there a special passage I can place this in or any way to have some timer run in the background across passages? Also, this is for an assignment, and my professor put a word count on it so a bulky solution may be unusable for me as well...

reddit.com
u/FigSenior6879 — 8 days ago

I'm wondering if there's any way you can set a variable inside an if statement, and then use that updated variable information in a future if statement later on in the same passage.

I've been trying, but it seems impossible.

To simplify things:

<<if _spam >= 10>>

<<set $key to true>>

<</if>>

<<if $key is true>>

xyz

<</if>>

Would this be something feasibly possible? Would adding an interactive macro like a button nested inside the first if statement with the <<set>> inside that button make things work?

Is there any work around for this, or would I just have to find a way to update the variable without an if statement?

reddit.com
u/FigSenior6879 — 18 days ago