How do I

0 favourites
  • 4 posts
  • Hello! I made a Flappy Bird like game and the score increases by one, whenever the bird and the pillar have the same x coordinate. If I make the pillar to appear every 1.2 seconds the score works fine. If I put it to 1.1 seconds, some pillars don't contribute to the score when the bird passes by them and if I put it to 1 second (which is what I want in the end), I get one point for the first pillar, but nothing for any other after that. If the time is more than 1.2 seconds the game also works fine. Why is this problem for smaller times? (I checked that the variable "score" itself doesn't work properly in the above mentioned cases, so it is not just a displaying problem) Thank you!

  • Silviu Do you have a capx you can share? If you're using a "trigger once whilst true" it might be due to a misapplication of that condition, or it could be because you have multiple pillars on screen at the same time.

    As a workaround you could spawn an invisible object with each pillar, spanning the gap that the bird flies through, and then add a point on collision with invisible object.

  • It is probably some configuration issue in your CAPX - easiest way is to follow mekonbekon's advice of spawning both a pillar and an invisible vertical line pinned or set (every tick) to the pillar X coordinate. That way you pass the pillar visually but the point comes from "killing" or "destroying" the invisible line upon collision that the player never sees.

    Good luck!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Silviu look at the flapy bird example that comes with C2 & C3

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)