Alice Community position cars at start

 position cars at start
captain
Guest

Status:
Posts: n/a
position cars at start - 03-12-2010, 11:23 AM

i have a road floating in space and 4 cars on it. this road has 4 lanes, 1 for each car in the starting block. at runtime i stretch the road to 1000's of metres and then try to position the cars at the start using relative positioning. i cant get the cars where i want them.
Attached Files
 race.a2w (310.4 KB, 5 views)

 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 03-12-2010, 12:13 PM Two ways you could do that: -Vehicle the cars to the road. If they're positioned right, they should move with the edge of the road as it stretches -At runtime, have the cars move to the center of the road, then move backwards the road's length minus the car's length (length functions can be found under each object's functions tab on the center-left side of the screen). (')>
captain
Guest

Status:
Posts: n/a
03-12-2010, 12:44 PM

Quote:
 Originally Posted by x2495iiii Two ways you could do that: -Vehicle the cars to the road. If they're positioned right, they should move with the edge of the road as it stretches -At runtime, have the cars move to the center of the road, then move backwards the road's length minus the car's length (length functions can be found under each object's functions tab on the center-left side of the screen).
1 vehicle might work but i must have the cars in exactly the right positions. and i probably cant get them there.

2 do you mean half the roads length? well i also must move the car up after that so it sits on the the road instead of half above and half below.

you take the attached a2w and see if you can position the myCar to the left lane of the road, at the back.

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge