-
If you are using premades, there are no prerequisites!
-
If you are starting from scratch, knowledge on the Collision Detector node is required.
Are you making a game, but are unsure of how to end it? There are many ways, depending on what you want to do.
The easiest way to do this is by using our premades. There are several you can use, including a finish flag, an invisible area, and a racing goal.
We also recommend checking out our in-app tutorial Easy Game Endings and following the steps there.
https://wiki.hypehype.com/how_to/game-end.mp4
You have probably seen the container called “Game End System” when turning on Logic. This contains logic that works together with different premades.
- Open the Asset library and search for “finish." Add the Finnish: Flag premade.
- Now, add a player character. For this example, add the Platformer Player.
- Position the flag where you want the end to be. Use the handles to make it easier to move it in one plane!
- Playtest, and go towards the flag with the character.
The game is now complete! This is the easiest way to set up a game ending.
- Add a runner player from the Premade section of the Asset library, and a Circle Marquee. For this example, add the Platformer Player.
- Place the marquee some steps away from the player character.
- Add a Collision Trigger node to the marquee. Make sure it triggers with the green group.
- Add a Game End node to the scene, and place it close to the marquee.
- Drag a link from Collision Trigger - On Collision Start to Game End - Execute.
- Playtest. Now you should run towards the marquee. Once the character touches it, the game will end.
- In the example, the game ends in success. You can also make it end in failure. This is useful if you want the player to fail if they run out of hearts, for instance. To do this, open the Game End node and set Type - Fail.
- You can also set the game to restart automatically once the player reaches the end or collects all the score, for example. To do this, open the Game End node and set Ending Type - Restart Automatically.
- Using the premade is recommended at the beginning. You can u se them as a first step to study logic.
Pro Creator Tip: If you want to show something before the end game screen, you can change the Game End - Wait Time to last longer so you have time. For example, you can show stars adding up before the game ends.
https://wiki.hypehype.com/how_to/game-end-stars.mp4
Explore the following links for more related content and additional resources. These pages contain valuable information that complements what you’ve just read.
Connecting Nodes