PDA

View Full Version : Camera track car


falconets25601
02-06-2008, 03:09 AM
Hello this is my first post, I have done some Alice programs and now I am doing a game which
Lets say there is a button which lets you select car A or car B, the camera would then track which car you just selected.

I have tried this but the if/else statement did not work as it would automatically follow car A and not B

Thx alot!

marriott
02-06-2008, 06:18 PM
Hello this is my first post, I have done some Alice programs and now I am doing a game which
Lets say there is a button which lets you select car A or car B, the camera would then track which car you just selected.

I have tried this but the if/else statement did not work as it would automatically follow car A and not B

Thx alot!

You can do "set vehicle to" programatically. Have the event for the first button do "camera set vehicle to car A" and the second button do likewise for car B. Set the camera's vehicle as, say, car A using the property menu when you are setting up the objects for your world.

...or have you already tried this? How was your if/else statement set up?

DickBaldwin
02-06-2008, 09:28 PM
Hello this is my first post, I have done some Alice programs and now I am doing a game which
Lets say there is a button which lets you select car A or car B, the camera would then track which car you just selected.

I have tried this but the if/else statement did not work as it would automatically follow car A and not B

Thx alot!

Unfortunately, this is typical of posts asking for help but not providing enough information for anyone (other than a mind reader) to provide help. If you need help, you should learn to define your problem more clearly, or at least attach a copy of the code that doesn't work so that others can determine why it doesn't work.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm

falconets25601
02-06-2008, 09:47 PM
thx marriott, silly me for forgetting to just use a simple statement, it is solved now
thx

John_Clark
02-07-2008, 11:20 AM
Another thing you could do is an If/Else statement saying something along the lines of If Car A is clicked then Camera follow Car A Else Camera follow Car B. Although the coding won't workout exactly the same because I'm saying the code in basic (because it is just easier to tell people that way so they can interpert to the language they need)