Twine Version: 2.3.8
Story Format: Sugarcube 2.31.1
Hello all.
I have a very beginner’s knowledge on Twine/Sugarcube (or general, in fact) programming and I wanted some help with implementing a system.
I’m working on a game with an exploration focus. The navigation system is working well, with each room being a different passage. What I wanted to ask help with is: is it possible to trigger an event that will only “fire” after walking through X rooms?
Situation 1: You find a fountain and drink from it (setpoison1 to true), but nothing happens at first. Then you walk through 3 rooms and oops, -50 HP (with either a “Dialog popup” or an automatic redirection to a passage saying how “all of a sudden you feel very ill” and such).
Situation 2 (if they are exclusive, this one would be priority): You find a fountain and drink from it (setpoison2 to true), but nothing happens at first. Then, for every 3 to 5 rooms you move, -10 HP, again with either the Dialog popup or forced redirection to give player a feedback, permanently - until you drink the antidote and setpoison2 to false.
Also, two complications: Is it possible to mark which passage should and should not be considered on the countdown (maybe with tags) to avoid passages like Inventory and Character profile being counted?
And the second: to “force” the event to fire manually? I have a simple Time Passage system controled by a variable “set $daytime to 1” (morning) and certain actions advance time ($daytime += 1). Can it be made that, if time advances while under the “Poisoned” effect, immediately trigger the damage event and (in Situation 2) restarts the countdown?
Thank you all in advance.