Tutorial 11: Create an End Screen

Based on the previous tutorial, on our players Step event, we said that when a players lives reach 0 we want the game to go to an end room.

Create an End Room

  1. Duplicate your game room. Right click on the room in the Asset Browser and click duplicate.
  2. Rename this room EndRoom1
  3. Remove all the objects from the Instances layer in the room
    – Click on each object and press delete on the keyboard
  4. Make sure this end room is below the game room in the rooms list. If it is not, drag it below it.Let’s now create a button to allow you to restart the game

Create a button to restart the game

There are lots of ways to create buttons. You could use Paint on Windows, Piskelapp.com or any image creation tool. For simplicity, let’s use https://dabuttonfactory.com/

  1. Go to the above Website
  2. In the Text box type Re-start Game
  3. Choose you font and any other text options you like
  4. Go to the left side of the screen and pick your styles
  5. Under the button is a Download link. Download the PNG file
  6. Create a sprite from the button, sprRestartBtn
  7. Create an object for the Re-start, objRestartBTN
  8. Add a Mouse Left Pressed Event to the button and add the code:
    room_goto(room0); //or whatever your first room is called

  9. Place the restart button object into EndRoom1
  10. Test that it restarts the game

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *