Game Logic: restartGame

restartGame()
  • Restarts the game by reloading the current blend file from your hard drive.
Sample Code

################## Restart the game
  

# import bge
import bge

# restart the game
bge.logic.restartGame()