Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Calling multiple scenes on the same frame has wrong behavior #1642
Create 2 parallel map events with this code:
Start a new game on the map.
In RPG_RT, the save menu will be called only once
This also happens if you teleport into the map.
This is very much like #1624,
If you use different menus here, only the menu called by EV2 actually appears.
What must be happening is this:
The only special case are battles.
If you setup the events as
If you setup the events as
From Cherry's comments in another issue, my suspicion is its actually using
For accurate frame timing in the interpreter we must emulate this behavior. If we call the menu twice we start adding extra frames which can break other things.
So I will emulate the observed behavior of "call the last scene requested by all parallel events that ran in this frame."
This can be done with
I will of course not emulate the transition bug
The gameover scene also exhibits this behavior!
Create parallel event EV02 with
Start a new game, the menu is called.
Change EV01 to
The menu is called and game over is averted!
Return to title is not affected by this! A call to return to title seems to happen immediately.
Yes, it should be the same for all scene changes, also "change hero name", "open shop", ...
Yes because this throws an exception (in order to cancel out of whatever code is running) which then resets the whole game, same as F12 does.
Basically it also just triggers a game over, so that's expected, but this way I found two interesting things, actually bugs.
(You can add more such parallel events... then you can get any number of battle start sounds, and if you sprinkle "game over"s between the battles, you also get the effect of the battle music restarting... isn't it fun playing with bugs...)
Here is another case for battles.
Setup EV01 parallel with:
Setup EV02 parallel with:
Start a new game
Grassland 2 battle runs. After the battle, the screen stays black until you enter and exit the menu.
There is this black screen issue when you abuse event battles that has already been reported elsewhere. We will fix this player.
More importantly, when you trigger multiple battles in the same frame, only the last battle is actually triggered. Futhermore, only the event that triggered that battle actually reacts to the battle results. The other event just skips ahead past the battle it called and continues on to the next command.
How about messages an scene calls?
Title screen and exit game are handled by #1784
We still need to fix continuations so that only the event that triggered the scene that actually was called reacts to the scene results. Other events which called a scene and got overwritten skip over the conditions of the scene results.