how to stop a scene ?

is there anyone know how to stop scene when a “Player” is in collision with Enemy object ? pls help me :frowning:

Do you want to pause the scene, restart it or start a new one?

no , i just want to stop current scene when a player is in collision with an enemy

But what do you mean with stop? Pause the scene, but keep it visible like a pause menu… Stop the game (exit)… Stop the scene but start another one, for example a game over scene… :confused:

yeah , i mean pause a scene ._.

This one pause the scene (everything freeze):
pausethescene.png
This change the scene (New scene, maybe showing final scores etc. whatever you want):
pausethescene2.png

1 Like

tks u very much , i will it :slight_smile:) (y)

Nice, I was wondering about how to do this as well. Usefull for hitlag on projectile impacts as well. Excellent! :slight_smile:

Just a bit more input:
Events that create objects are not deactivated by default when the time scale is set to Zero.
Say you have a character that can move around with arrow keys and shoot with the space key. You can’t move after setting time scale to 0, but you can still shoot. The bullet will materialize in front of the player, but it will no move. Workaround for this is to add “time scale >0” as a condition to the event that controls shooting.
Same seems to go for certain variable. If you have a global variable that gets increased e.g. +1 every step, this will continue to happen even if the time scale is set to 0. I think this is on purpose :question:
Anyway, for a simple game pause, the method that jumps to another rooms seems easier to do.

The time scale only act on actions and conditions that acts accordingly to the time (force action, but not positioning, timers…).