Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
I need help with a racing game
Status: Offline
Posts: 16
Join Date: Nov 2011
Default I need help with a racing game - 11-18-2011, 07:31 PM

Hi. in my racing game I would like the car to stop or slow down when it goes off road. can you please either give me a link to an image with the method or a nother thread that has successfully solved this problem. Thank you
Reply With Quote
Status: Offline
Posts: 38
Join Date: Nov 2011
Default 11-29-2011, 12:12 AM

The exact solution will depend on what kind of road you have (straight, bending?). But in general terms you could use one or more dummy objects to define the edge of the track. Then you could use "distance to" functions to determine when the car goes off the track. Put the test inside a "when something is true" event and get the car to stop/slow whenever the event is triggered.

This is a similar problem to collision detection, so you might want to do a search on this. I have a video on collision detection - follow the first link in my signature.

For video tutorials on programming in Alice 2.2 check out my YouTube channel

Also check out my Programming in Alice blog at
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.