Questions about the timing of scenes and conditionals in descriptions

I’ve come across this often enough and it’s frustrating, requiring dumb workarounds every time.

A scene seems to start /after/ a room description is printed, even if the player is moved to that location as part of the scene.

There is a scene called Scene_Day_Two.
Scene_Day_Two begins when Scene_Dreams has ended.

When Scene_Day_Two begins:
	now player is in Room_Protected_Hollow;

Room_Protected_Hollow is a room.
The printed name is "Protected Hollow".
The description is "[if Scene_Day_Two has not happened]It's dark in here.[else]It's bright and early.[end if].".

Results in

> wake up
Protected Hollow
It’s dark in here.

> look
Protected Hollow
It’s bright and early.

Why come? And how do I overcome that?

What causes Scene_Dreams to end? When does that happen?

Actually, because of that. Moving the player prints the room description, and at that point the scene is in the process of beginning but has not yet actually begun, thus has not happened is still true.

Perhaps you should test if Scene_Dreams has ended instead?

1 Like

I think it relies on a truth variable being set and the player being awake (an either condition).

I can try that, but I think I assumed that it would have the same problem, ending, but after the room description had printed.

I’d say just have an explicit flag on the room for darkness, and set it in the “When Scene_Day_Two begins” rule. Before or after the player movement, as desired.

Normally I try to avoid having redundant variables – what if they get out of sync? But sometimes you just have to stick in a thingie and move on.

Ouch. But yes, I understand.

Weirdly, even though one scene started when the previous scene ended, making the description dependent on the the ending of the previous scene allowed the description to print correctly. Bug or feature? not sure.

I did not think this would work. Imagine my surprise.

Surely feature- this is intuitively the expected behaviour :slight_smile:

It’s simpler than that. A scene has only happened if it has fully run its course, i.e. both begun and ended (WI 10.4):

if (scene) has happened:

This condition is true if the given scene has both begun and ended.

so ‘a scene has not happened’ remains true right until the scene has ended (for the first time, if recurring).

The condition for a scene which has started and has not reached its end is

if (a scene) is happening