How do I

Get help using Construct 2

Post » Thu Jun 08, 2017 9:09 pm

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!
B
4
Posts: 29
Reputation: 264

Post » Fri Jun 09, 2017 6:33 pm

@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.
B
19
S
8
G
3
Posts: 429
Reputation: 3,972

Post » Sun Jun 11, 2017 5:57 am

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!
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152

Post » Sun Jun 11, 2017 7:31 am

@Silviu look at the flapy bird example that comes with C2 & C3
Image
B
24
S
13
G
11
Posts: 278
Reputation: 8,687


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests