Scene preloading doesn't direct to the right scene

How do I…

A clear and concise description of what you are trying to do.
I was trying to make an event where you would hit enter when a continue button is selected, the game would preload the intended next scene, and then send you to the loading screen scene. In the loading scene, it’ll open up the preloaded scene when the preloading is done.
Instead what happened was that every time regardless of what scene i was previously on or selected to preload, it would ALWAYS send me to the newest scene that i had made. I “fixed” this by making global variables that would turn on when you have a scene change instead, changing the scene in the loading screen depending on what boolean was on, but obviously this is horrible for waiting times and its not a real loading system. I thought maybe just making it so that it preloads the next scene in the loading scene would work, but the same issue from before was present. If anyone knows what is going on here your help would be MUCH appreciated, thanks for reading this.


Just so you’re clear on the process. As soon as the first scene is loaded, GD continues to preload other scene in the background. It preloads them based on their order in the scene list. The other scene might already be preloaded before you even try to manually preload it. A lot of things can happen while the waits are waiting.

If other scenes are loading then it sounds like a state issue. Multiple states or conditions are true at the same time and the one with the shorter wait time is being processed first. Regardless of a short or long wait. Only 1 scene change should be allowed to be trigger at a time and once a scene change or series of events are set in motion the user shouldn’t be able to have any further interactions.

I don’t know why the preloading event isn’t the first action. You can make sure the other scene is preloaded the second the chain of events is started. Instead it waits 5 seconds before setting CCHBW to true.

What’s the value of loading_background?

the value of loading background was just a number variable for the 2nd instance of the “loading_background” object because i had 2 of them in the scene and the 2nd one fades the screen black in the action.

Hey, just letting you never responded to my message i replied to you with. Thanks for reading!

Sorry, I either didn’t have an answer or maybe I thought it was solved. Sorry about that.

Where is loading_background set to “2”. Is that part happening at the right time? Is there another event being triggered to change it to a different scene? Can you post a screenshot of those events.

IDK if I have enough to go by. Either post related events or a video link to a video showing what’s happening.

It might be easier if you are willing to share your project. Put the entire project folder on a file sharing sharing site and post a link to it. Just let me know what I need to do to test that part.

the “2” is set on one of the instances’ number variables on the editor, it’s not set by an event.


Also here’s the event for the scene change, along with all the other events for the scene, the other folders are the same as the “1-1” folder, but they’re referencing their respective scenes instead.

The 2nd image is just black. Is that supposed to be events?

What prevents the scene change? Should the scene get loaded in the background? Or is this a scene made just for loading the next scene.

the black thing is just the “loading background” which is just the color black, because the loading screen is black. Also the scene is made for loading the next scene.

So, does the “Loading screen” scene contain similar lines for other scenes? If so, the change scene needs more than scene was preloaded condition because the scenes automatically get loaded in the background. If multiple scenes are preloaded then it will use the last processed scene change action.

I just did a quick test. GD does something that I don’t agree with. It doesn’t immediately change scenes. It finishes the event sheet.

My tests scenes were almost empty so all of the scenes were preloaded in the background. I used a global array to track which events were triggered.

In this case, all 3 events were triggered. Execution went to Scene4. The last processed scene action. The array contained 2, 3 and 4.

If you’re setting a global variable in the play or level scene then the event that changes the scene should probably also check for that variable.

Scenes are preloaded based on the order in the scene list. If levels are played in order than it should automatically load the next scene while the player is playing the current scene. If a scene isn’t loaded then the change scene will load it. Although, I’m guessing that would cause the loading screen to be displayed.