Testing to see if car is on race track

Get help using Construct 2

Post » Sun Apr 21, 2013 9:11 am

I have a number of tiles that will allow me to build a racing track (birds-eye view style).

How do I:
1) test to check that the car is on the track?
2) Bound the car to the track?
B
4
G
2
Posts: 42
Reputation: 811

Post » Sun Apr 21, 2013 9:18 am

I tried the following to get question 2 above to work.

www.internetlinked.com/tmp/TrackRacer.capx

I was hoping that the track layer might act as a mask but it didn'tabasel2013-04-21 09:19:30
B
4
G
2
Posts: 42
Reputation: 811

Post » Mon Apr 22, 2013 1:06 am

The reason it didn't work is because you'll ALWAYS be overlapping the background. You need to check whether or not the player is overlapping each piece. Arsey to do in the free version without families (you need to add events to check the player isn't overlapping each track piece).

I'm a bit busy with my own project, but bump this thread through the week to remind me with @procrastinator and I'll get to it when I can, unless someone else gets there first ;)
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Mon Apr 22, 2013 1:15 am

Another way off the top of my head is to have a hit box and create copies which overlay the track. This way you only have to check if it's overlapping the hitbox or not.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 12 guests