pauseForMore being called before double quoted strings are being printed in scene start?

Yes. Everything works now!

1 Like

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.

2 Likes

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.

1 Like

My bad, lol :smile:

Oh! Thatā€™s an excellent point! Will do! :grin:

1 Like

Okay, edited! Hopefully itā€™s not too verbose, but I wanted to give future explorers some options, lol.

1 Like

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ā€¦

1 Like

Ohhhhh, okay so start() calls whenStarting() from within the scene object?

1 Like

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.

1 Like

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ā€¦!

2 Likes

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ā€¦

1 Like

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.

1 Like

Iā€™ll make another edit to acknowledge this. :grin:

1 Like

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.

2 Likes

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.

1 Like

Did you see the OneTimePromptDaemon option?

1 Like

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?

1 Like

ā€¦Oh. Then I misunderstood the docs lol. Iā€™ll edit the solution again eheh.

1 Like

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?