How do you set up an artificial timer? I want to use it for status effects that eventually wear off, or for delayed scenes that pop up a few days after you trigger it, and so on.
My game is played using a calendar system, so I keep track of an arbitrary ingame date (day 1, day 2, etc). I want to create an event countdown so that after a week passes in-game, a certain scene is triggered.
so far this is my very simplistic method, it involves injecting a few lines of code to every “day” of the game.
*create timer 0
When the timer starts:
*set timer 7
Add this check to every day of the game:
*set timer -1
*if timer = 1
I plan to modify the mini-scene system found here, so there’ll be another .txt file with all the delayed events which will trigger depending on your variables.
The problem is that I can’t have overlapping status effects or events. I’d have to create multiple timers for that, which would make the code really clunky.
Is there a more elegant solution available?