monorail

refl3ction

New Member
in my D3RPG i have a monorail, waht i need to know is how i make the three following cars follow the first car

its set up like this [C1][C2][C3][C4]

i need to know how do i get C2-4 to follow C1 when C1 moves.
 
Werbung:

Arkidas

New Member
Code:
Set Units
????Events
????????Map initialization
????Conditions
????Actions
????????Set MonorailWagons[1] = Priest 0000 <gen>
????????Set MonorailWagons[2] = Priest 0001 <gen>

Code:
Move Monorail
????Events
????????Unit - A unit Is issued an order targeting a point
????Conditions
????????(Issued order) Equal to (Order(move))
????????(Triggering unit) Equal to MonorailWagons[1]
????Actions
????????Unit - Order MonorailWagons[2] to Follow MonorailWagons[1]
 

Xeridanus

New Member
this will have consequent cars "cut corners" and not follow the track.

however i am yet to come up with something better.

maybe have waypoints (1x1 regions) along the track and make each car move through the waypoints in order.
 

refl3ction

New Member
my "track" is built like this:
X=cliff M=monorail _=track

X_X
X_X
XMX
XMX
XMX
XMX
X_X
X_X

and plus i added regions along the track so the monorail moves to the region, "airlock" opens and continues moving
 

ragingspeedhorn

New Member
If you want the cars to follow the exact position of the front car then I suggest you use offsets. I can try to make something up and put it here on the site.
 

Abelhawk

New Member
It might also be good to go into the Constants menu and change the follow speed to lower, but maybe that wouldn't be good for your other units.
 

Xeridanus

New Member
um, i think the cars would cut corners more then, cos they would be futher behind. ok, so you have regions, make more along the track (heaps on the corners) and have the cars ordered to move to each region in turn. you might want to have them follow each other on the straights or have zero collision. it's up to you.
 
Werbung:

james1654

New Member
how about dummy units.

Events:
Time - every 0.5 seconds of game time
Contitions:
none
Actions:
Unit - Move dummy unit instantly to position of C1
wait 0.01
Unit - Order C2 to move to position of dummy unit


- - - - - - - - - - - - - - - - - - - - - - - -

And you Might wanna experiment with the

Movement - turn rate

in object editor, to get a smooth, monorail-like turn
 
Top