Yes. Everything works now!
Been there, lol
WOOHOO!
Might wanna mark this thread as solved, just in case future explorers filter searches by āsolved threads onlyā, when they face a similar problem.
Already on it! If you wouldnāt mind, adding a quick clarification to the first method in the code block you showed me that says it should either be on the scene, or have self
changed to the scene you want to start, might help people later on, cuz I had to figure that out.
My bad, lol
Oh! Thatās an excellent point! Will do!
Okay, edited! Hopefully itās not too verbose, but I wanted to give future explorers some options, lol.
It looks really good overall, but I just realized that I have the Fuse calling .start()
in my code because whenStarting
only prints the sceneās starting message, it doesnāt actually change all the game state to officially start the scene. So this code as-is could introduce some really subtle bugsā¦
Ohhhhh, okay so start()
calls whenStarting()
from within the scene object?
Yeah, whenStarting
is just for stuff you wanna do when the scene starts, and the programmer overrides it completely without calling inherited
or anything in the manual examples. So from that we can surmise that it canāt possibly be updating game state. And start()
on the other hand calls whenStarting
, so thatās probably where all the game state updating happens.
Omg ahahahaha, I just remembered thereās a proper scene system in Adv3Lite. Thatās really embarrassing, lol.
This entire time Iāve been using a homebrew system that I made for my first TADS game, lmao. At the time, I needed scenes to do some other stuff, and I guess I forgot about scenes since then. This all makes so much more sense!!
Okay, I edited the solution code again with this change in mind. My apologiesā¦!
Are you able to test how the Fuse behaves with NPCs and atmosphere (or other active daemons) taking turns? That might be pertinent to be a general solutionā¦
I donāt have any NPCs right now, and the location where the Fuse takes place doesnāt have any atmospheric daemons either, but Iām sure itās fine.
Iāll make another edit to acknowledge this.
Iāve also added an alternative solution using a OneTimePromptDaemon
, which executes using a slightly different timing. This probably wonāt change the behavior of @alexispurslaneās code (which already meets the needs of her own design constraints), but if @johnnywz00 would like to try/vet this alternative for NPC and atmospheric daemon test cases, then this alternative could be more useful for other future explorers.
I havenāt yet set up a dummy adv3Lite environment to do any testing, but I fear that setting eventOrder on the Fuse isnāt going to fix the problem. The eventManager runs all of its Fuses and Daemons after all Actors and atmosphere have run: their priority orders arenāt compared to each other.
There surely must be a satisfactory way to use Pause in game code⦠I hope Eric chimes in on this.
Did you see the OneTimePromptDaemon
option?
Note: this isnāt a problem in adv3⦠I use Pause everywhere⦠the only time I have to think twice about it is if Iām using a captureFilterā¦
PromptDaemons run last of all, so that would seem to increase the chances of non-pertinent text being shown in between?
ā¦Oh. Then I misunderstood the docs lol. Iāll edit the solution again eheh.
No worries⦠I canāt remember, @alexispurslane , did you try afterAction or is that not a valid hook for what youāre trying to do?
Hey, wait, would this work?
fuseStartMethod() {
new OneTimePromptDaemon(scene, &start);
gAction.turnsTaken = 0;
}
That would prevent anything set to happen on the next turn from firing, right? And OneTimePromptDaemon
doesnāt rely on turns passing, yeah?