130 likes | 628 Views
Flappy Bird Code. By Thomas. P . Flappy Bird Code. This code broadcasts reset when the green flag is clicked along with changing velocity to -0.5 and changing the Y by the velocity forever.
E N D
Flappy Bird Code By Thomas. P
This code broadcasts reset when the green flag is clicked along with changing velocity to -0.5 and changing the Y by the velocity forever. This code allows it so that when the space bar is clicked (how to fly) and dean is not true then it set you velocity to 7 allowing you to fly again.
When die is broadcasted (which is when you die) and dead is not true, it set dead to yes and then plays the sound ‘HandClap’. The code points the sprite downwards and make you hit the ground. This code changes the birds costume every 0.1 seconds to make it look like it is flying.
This code means that when you press the space key and you’re not dead it will play the sound ‘DrumBuzz’ When the broadcast reset is received it points the bird in a 90° angle and set the Y & X to 0. Its makes the bird to the front and set the velocity to 0 and dead to ‘no’.
These codes choose a random pipe and spreads them out evenly so you can fly through them.
This code hides variables and sets X & Y to 0. It also make the variables go to the front and then show both variables.
When the broadcast die is received and score is higher than highscore the game says ‘ New High Score.