Flappy bird scoring?
http_gamesalad
Member Posts: 1,340
How do you register a score when you pass a poll?
How do you register a score when you pass a poll?
Comments
Would depend entirely on how you set your game up. I did a tutorial for another website and in that I had an invisible actor placed between the poles. When the bird touched the invisible actor the score increased.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
first make two global attributes:
one real one called Player X.
and one index called score.
in your player actor add this:
constrain game.player X to self position X
then in your poll actor put this rule:
if game.player X is greater then self.position X
change game.score to game.score+1
@ashtmj @jamie_c nvm I got it working ! thanks for your help
@ashtmj @jamie_c sorry to bother again! I ran into a little problem. I want my poles to spawn very fast and the thing I constrained to the poll keeps going to the new poll that is spawned and it's not registering the points. How can I fix this problem?
How is your game set up? A little more detail could help.
Are your poles moving and your player actor static (horizontally)? If so, the best way to do it is to check when a pole moves past the player's position, it means no need for constraining and such.
@pHghost thanks bro! sorry I found a solution