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.