This first method uses time and it worked well until the game was tested on a dedicated server with three players. The script_objects overlaped each other by about 64 unit.
Code: Select all
//------------------------------>
// Pole Threads
//------------------------------>
pole_prep:
$pole time .001
$pole2 time .001
$pole3 time .001
$pole moveto $polewayA
$pole2 moveto $polewayA
$pole3 moveto $polewayA
$pole move
$pole2 move
$pole3 waitmove
Thread pole1loop
wait 2.4
Thread pole2loop
wait 2.405
Thread pole3loop
end
pole1loop:
$pole time 7.2
$pole moveto $polewayB
$pole waitmove
$pole time .001
$pole moveto $polewayC
$pole waitmove
$pole moveto $polewayD
$pole waitmove
$pole moveto $polewayA
$pole waitmove
goto pole1loop
end
pole2loop:
$pole2 time 7.2
$pole2 moveto $polewayB
$pole2 waitmove
$pole2 time .001
$pole2 moveto $polewayC
$pole2 waitmove
$pole2 moveto $polewayD
$pole2 waitmove
$pole2 moveto $polewayA
$pole2 waitmove
goto pole2loop
end
pole3loop:
$pole3 time 7.2
$pole3 moveto $polewayB
$pole3 waitmove
$pole3 time .001
$pole3 moveto $polewayC
$pole3 waitmove
$pole3 moveto $polewayD
$pole3 waitmove
$pole3 moveto $polewayA
$pole3 waitmove
goto pole3loop
end
Next I tried to use four poles and have one pole wait at the starting point (waypoint A) until the one before it got to a script_origin--exactly 1/3 the distance to the next point (waypoint B). Then it is glued to a script_origin bound to the end point of one before it. That worked fine in a test map, but fails in the real map. There is a gap of about 8 units between the wires and the next pole. And, if I lenghten the wires, the game crashes with infinite loop errors.
Code: Select all
//------------------------------>
// Pole Threads
//------------------------------>
pole_prep:
$pole1 time .001
$pole2 time .001
$pole3 time .001
$pole4 time .001
$pole1 moveto $polewayA
$pole2 moveto $polewayA
$pole3 moveto $polewayA
$pole4 moveto $polewayA
$pole1 move
$pole2 move
$pole3 move
$pole4 waitmove
$pole1 hide
$pole2 hide
$pole3 hide
$pole4 hide
$pole1 time 7.18
$pole2 time 7.18
$pole3 time 7.18
$pole4 time 7.18
$p1o bind $pole1
$p2o bind $pole2
$p3o bind $pole3
$p4o bind $pole4
wait 5
thread pole_timer
end
pole_timer:
Thread pole1loop
while (int(vector_length ($pole1.origin - $go_point.origin) > 16))
waitframe
Thread pole2loop
while (int(vector_length ($pole2.origin - $go_point.origin) > 16))
waitframe
Thread pole3loop
while (int(vector_length ($pole3.origin - $go_point.origin) > 16))
waitframe
Thread pole4loop
while (int(vector_length ($pole4.origin - $go_point.origin) > 16))
waitframe
thread pole_timer
end
pole1loop:
$pole1 show
$pole1 glue $p4o
$pole1 unglue $p4o
$pole1 moveto $polewayB
$pole1 waitmove
$pole1 hide
$pole1 time .001
$pole1 moveto $polewayC
$pole1 waitmove
$pole1 moveto $polewayD
$pole1 waitmove
$pole1 moveto $polewayA
$pole1 waitmove
$pole1 time 7.18
end
pole2loop:
$pole2 show
$pole2 glue $p1o
$pole2 unglue $p1o
$pole2 moveto $polewayB
$pole2 waitmove
$pole2 hide
$pole2 time .001
$pole2 moveto $polewayC
$pole2 waitmove
$pole2 moveto $polewayD
$pole2 waitmove
$pole2 moveto $polewayA
$pole2 waitmove
$pole2 time 7.18
end
pole3loop:
$pole3 show
$pole3 glue $p2o
$pole3 unglue $p2o
$pole3 moveto $polewayB
$pole3 waitmove
$pole3 hide
$pole3 time .001
$pole3 moveto $polewayC
$pole3 waitmove
$pole3 moveto $polewayD
$pole3 waitmove
$pole3 moveto $polewayA
$pole3 waitmove
$pole3 time 7.18
end
pole4loop:
$pole4 show
$pole4 glue $p3o
$pole4 unglue $p3o
$pole4 moveto $polewayB
$pole4 waitmove
$pole4 hide
$pole4 time .001
$pole4 moveto $polewayC
$pole4 waitmove
$pole4 moveto $polewayD
$pole4 waitmove
$pole4 moveto $polewayA
$pole4 waitmove
$pole4 time 7.18
end
I know I can use streight wires that are fixed in place, but the sagging wires look so cool as they go by the train.
Any, help would be great!





