Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | AU_38 |
Hi guys I know how to restart the game but I do not know how can I configure an object that triggers the restart. For example in an endless runner like flappy bird are the tubes deadly for the player. How can I make the tubes deadly?
Let me see if I understand this correctly. You need a state such that, when the main character is defeated (e.g. “killed”), it then resets the game? If that’s correct, your game needs a “game over” trigger (the bird touching the tubes, for instance). In the case of Flappy Birds, the “game over” trigger looks like this:
- Move bird according to user’s input.
- If the bird collides with a pipe (one that may have an
Area2D
node), go to the “game over” state. - Reset the game from the beginning.
Ertain | 2019-12-30 00:18
And how can I collide the bird with the object?
AU_38 | 2019-12-30 02:38