How do I Detect and print missed object in game

Get help using Construct 2

Post » Fri Sep 12, 2014 2:30 pm

Hello, imagine that you fly and have to touch some game objects , when you touch it , it will give you a point, but when you miss it, it will show you a text , you missed one. I would like to know , how to detect that i missed such object, and there is gonna be many of them.
B
11
S
3
G
1
Posts: 419
Reputation: 1,782

Post » Fri Sep 12, 2014 2:34 pm

I have tried this, if my heroX is higher than the obstacleX and is not overlaping, restart layout, it dont work , the game froze

I would ned something like this

If Hero.X is higher Than Obstacle.X and there was no overlap , end game
B
11
S
3
G
1
Posts: 419
Reputation: 1,782

Post » Fri Sep 12, 2014 2:45 pm

You could do it with Events, but as I'm stuck on a part in my game at the moment I'll give you a simple solution that popped into my mind, :).

Make a transparent sprite that's as high as your active layout, but only 1px wide, and place it behind the player area with the Anchor behaviour. Then you can detect if it overlaps one of the missed objects and restarts the layout or ends the game.
Founder of Jadelight Studio, Developer of Libertas Aedifex, regular C2 Help contributor and fan of ambient music and Star Wars.
B
12
S
4
Posts: 255
Reputation: 2,008


Return to How do I....?

Who is online

Users browsing this forum: mcscooter and 23 guests