Wait for all events to finish before changing scene

Hi,
When I do a multipage project (pretty much like a website with multiple pages) I use the same scene and change content depending on what button is released. The problem is that sometimes when releasing a button to change scene (actually changing to the current scene but with different content), the button that was released in the first scene seems to be released again, automatically or something else weird happens. It’s like someone is clicking on buttons again when entering the second scene.

I have solved this by waiting 0.4 seconds when entering a scene before buttons are activated. I did click the stop any paused scene switch in the “change scene” action, even though I don’t really understand what it is doing. Anyways, is there a way to secure that all actions are finished and cleared before leaving a scene?

Cheers

Farid

“Wait for all events to finish” - The events’ sheet is looped, the events never finish.

Anyway, if you want the game to wait for something, as always, use a variable as condition and change its value whenever you see fit.

Ok, so when I want to change scene I first press the button to change the variable “changeScene”=true and when “changeScene”=true I change scene? That makes sense. Thanks!

Cheers

Farid

1 Like