|
-
Hi everyone
What i have is a racing game that pits the user against 3 other 'competitors' but what I need is some kind of detection so that when the users MC passes the finish line it detects either WIN or LOSE
how do i go about doing this?
thankyou for all the help in advance
Gav
-
Monkey Moderator
I assume you have used some sort of collision detection in the game already(car crashes with opponents, objects, side barriers etc).
Why not use the very same technique? - ie detect the collision of the cars and the finish line.
A collision with the finishline and any car could increment a counter for example. And when the players car collides with the finishline, you would execute some code that says;
If the counter = 1 then its a win(ie 1st over the line), else its a loss. This way you can also keep track of everyones end placing if you so desire.
(If you havn't used collision detection before then I suggest you go look in the tutorial section above to find out how You basically have to keep checking whether the area of one movie overlaps the area of another.)
hope thats a helpful idea, g'luck,
L
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|