Scene: end

end()
  • removes the scene from the game.
Sample Code

################## end the scene
 
# import bge
import bge

# get current scene
scene = bge.logic.getCurrentScene()

# end the scene
scene.end()