Quit game back to blender without esc

I just found out that there is a way to make your game quit back to blender without pressing esc. If you are making a game and want a quit option on the menu, and want it to quit to blender while running from blender mode, and close a runtime if running as a runtime, this might work. It won’t however solve the problem of disabling the esc key in fullscreen mode runtimes or blender-mode games. The only mode where the esc key doesnt quit is with windowed runtimes.

If you use a remove scene actuator, and remove all the scenes to the point in which there are no scenes left, blender will boot you back into blender.

If you have a menu with a quit option, attach the quit option to two actuators: A gameactuator, and a scene actuator. Set the game actuator to “quit this game” and the scene actuator to “remove scene”. For the remove scene, set it to the name of the current scene (at the top of the blender interface where it says “SCE:”. Whatever is after SCE: is the scenes name).

If you have more scenes than that, I would use a message, and have an empty on each scene that calls a remove scene actuator for that particular scene.

Now, the quit option should be able to quit in all modes of running the game!

heh, i never thought that it would do that.

good job

I’ve never had an instance where the “quit this game” actuator didnt work. why do you need the “remove scene” actuator? i just dont understand…

Yeah, just a quit game acuator will either quit out of the exe and quit out of the game back into blender.

Pooba

Hmm, I thought someone had asked about it before saying it didn’t work. Ah well, at least its interesting to see:)

:frowning: I wish i knew about this before i decided not to use threads. Cause if u exit blender using exc the the thread still runs :frowning: