Order of text outputted by concurrent scenes

In my current WIP, I’m implementing a radio that you can turn off or on in the background. I have an ‘every turn during’ rule that should do this.

However, when another scene ends, the ‘when the scene ends’ rule for that scene will be printed after the radio scene text.

Is there a way to force a scene’s text to always be printed last? I’ve tried moving it to the end of my code, but that didn’t work.

[Edited stupid misconception on every turn.] One thing you could do is suppress the radio report rule if the scene is running. (I’m inferring the radio report is part of the radio’s mechanism and not the scene.)

(not tested)

After switching off the radio: if the Dance Party is happening: do nothing; otherwise: say "You shut off the radio, and the music stops."

I think I may have misinterpreted…can you add “Now the radio is switched off.” to the scene ending mechanics so “Every turn when the radio is switched on:…” won’t run?

Hmm… I have more of a problem with ongoing stuff. Here’s an example that shows the issue:

[code]“Untitled1” by Brian RUSHTON

Example Location is a room.

RadioScene is a scene. TimedScene is a scene.

RadioScene begins when play begins.

TimedScene begins when play begins. TimedScene ends when the time since TimedScene began is two minutes.

When TimedScene ends:
say “This scene should go before the radio.”

Every turn during RadioScene:
say “This is the radio.”;[/code]

This is what outputs:

[code]Example Location

z
Time passes.

This is the radio.

z
Time passes.

This is the radio.

This scene should go before the radio.

[/code]

I don’t know for sure, but could it be as simple as creating your Timed Scene in the source text before the Radio Scene?

(I mean like literally cut/paste switch them.)

Here are your rules that are firing:

[Rule “A first turn sequence rule” applies.]
[Rule “every turn stage rule” applies.]
[Rule “Every turn during RadioScene” applies.]
This is the radio.

[Rule “A last turn sequence rule” applies.]
[Rule “When TimedScene ends” applies.]
This scene should go before the radio.

I know there’s probably a tricky way to do this, but I would personally figure out how to write the radio text cues into “TimedScene” so you can just write your last radio cue into the end of that scene and invent plot reasons the player can’t turn off the radio.

Okay, here’s about as tricky as I can get:

[code]“Untitled1” by Brian RUSHTON

Example Location is a room.

TimedScene is a scene.
TimedScene begins when play begins. TimedScene ends when the time since TimedScene began is two minutes.

When TimedScene ends:
say “This scene should go before the radio. Your protagonist switches off the radio in disgust at the song that is playing.”

RadioScene is a recurring scene.

A radio is a device in example location. It is switched on.

RadioScene begins when play begins.
Radioscene begins when radio is switched on.
Radioscene ends abruptly when TimedScene is happening and the time since timedscene began is one minute.
Radioscene ends normally when the radio is switched off.

When Radioscene ends abruptly:
now the radio is switched off.

Every turn during RadioScene:
say “This is the radio.”;[/code]

This radio text is just an Easter egg, and all of the scene endings are something dramatic, so it would make sense to turn off the Easter egg at each scene ending. This works; thanks!