Alice Community  

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

Reply
 
Thread Tools Display Modes
Camera track car
Old
falconets25601
Guest
 
Status:
Posts: n/a
Default Camera track car - 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!
   
Reply With Quote
Old
marriott
Guest
 
Status:
Posts: n/a
Default 02-06-2008, 06:18 PM

Quote:
Originally Posted by falconets25601 View Post
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?
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 02-06-2008, 09:28 PM

Quote:
Originally Posted by falconets25601 View Post
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
   
Reply With Quote
Old
falconets25601
Guest
 
Status:
Posts: n/a
Default 02-06-2008, 09:47 PM

thx marriott, silly me for forgetting to just use a simple statement, it is solved now
thx
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 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)
   
Reply With Quote
Reply

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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.