Page 1 of 1

Train : Moving

Posted: Sun Mar 04, 2007 1:10 pm
by Ang3^
Hello,

I would like my train moves on rails. (MOHAA)
I tried many thing but It wasn't a success.

How could I do ?

Moreover, is there a Driving tutorial for MohAA (not SH or other) ?

Thank You. :oops:

Truck

Posted: Sun Mar 04, 2007 6:04 pm
by tltrude
Here is a tutorial for moving vehicles. Just make your train a script_object and name it the same as the truck in the tutorial.

/t.php?id=68

Posted: Sun Mar 04, 2007 6:27 pm
by Ang3^
It's working well with the truck but not with the script_object... :(

(For Multiplayer - Allied Assault)...

:oops:

Posted: Wed Mar 07, 2007 4:16 pm
by Ang3^
Up ! :oops:

Posted: Sun Mar 11, 2007 12:45 pm
by bakka
just a few more question,
how to add sound to it ??
how can it be stopped ? (reach a pos and stop there)
is it possible to add some smoke to it ??

Posted: Mon Apr 09, 2007 4:18 pm
by Condor
Well, it depends on what you want to do with your train. If you want the battle to be on a train, have a look at the MP-Deathmatch map train-to-hell, the train is static, but the textures of the rails and grass are moving, trees, stations and bridges etc. are nonstatic and move from one end of the track to the other, hide out and move back to the beginning of the track.

If you want your train to move independent from players etc. make it script_object and use

Code: Select all

$trainobject loopsound traindriving
$trainobject time 4
$trainobject moveTo $pathnode
$trainobject waitmove
$trainobject stoploopsound
a simple way or use the driving tutorial.

If you want to control the train, you have different options. I made a tram which followed a given path, but speed and status (driving/notdriving) was controlled by players using 2 levers (Speed +, Speed -) and usable Trigger, and an automatical script controlled break which stops the train if it passes a certain X/Y-Point.