Alice Community  

Go Back   Alice Community > Alice 2 > Works-In-Progress

Reply
 
Thread Tools Display Modes
position cars at start
Old
captain
Guest
 
Status:
Posts: n/a
Question 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
File Type: a2w race.a2w (310.4 KB, 5 views)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 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).


(')>
   
Reply With Quote
Old
captain
Guest
 
Status:
Posts: n/a
Default 03-12-2010, 12:44 PM

Quote:
Originally Posted by x2495iiii View Post
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.
   
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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.