Adding some examples to the answer of Bouh
//Switching scenes runtimeScene.requestChange(gdjs.RuntimeScene.REPLACE_SCENE, "sceneName"); //Pausing scene and starting another runtimeScene.requestChange(gdjs.RuntimeScene.PUSH_SCENE, "sceneName"); //Restauring the paused scene runtimeScene.requestChange(gdjs.RuntimeScene.POP_SCENE); // Cancel any change request if it is not too late (do not do that, this is just an example but you really shouldn't do that) runtimeScene.requestChange(gdjs.RuntimeScene.CONTINUE);
Seems like this does not work anymore for GDevelop 5?
None of them work.
Indeed, the enum has been separated from RuntimeScene, it has now its own object:
// gdjs.RuntimeScene => gdjs.SceneChangeRequest runtimeScene.requestChange(gdjs.SceneChangeRequest.PUSH_SCENE, "New scene");
Ok thanks mate. Its working now.