How to make a train

How to make a train

Re: How to make a train Posted by ManO-TPF on Tue Nov 30th 2004 at 11:54pm
ManO-TPF
11 posts
Posted 2004-11-30 11:54pm
ManO-TPF
member
11 posts 21 snarkmarks Registered: Nov 23rd 2004 Occupation: Pastor Location: USA
Hey all, is there a tutorial that describes how to make a train run through a map?

I have a subway map that I want a unmanned, unridable train to run through every now and then. But I am having trouble understanding the func_train, or find any tutorials on it.

Do I want the train function or is there a way to have a model or brush keyframe from one spot to another on a cycle?

Thanks for any help. Here is a screenshot of my very bare subway station so far.

User posted image
Re: How to make a train Posted by G.Ballblue on Wed Dec 1st 2004 at 2:00am
G.Ballblue
1511 posts
Posted 2004-12-01 2:00am
1511 posts 211 snarkmarks Registered: May 16th 2004 Occupation: Student Location: A secret Nuclear Bunker on Mars
I'll leave this as a comment so someone else can extend off of what I have to say :

First, construct your train out of world brushes. Then decide where the "turning point" of the train is, and create a brush there, with "origin" texture. Drag'n drop of the entire train, and origin brush, and set the objects to a func_tracktrain I believe. Under the flags section, check the box that says "HL1 train" (I believe this keeps everything simple). Now create some info_path_tracks (I belive thats the entity name, look for an entity with the words "path_track" if you don't find exactly what I said). Give this path_track a name -- this will be where the train starts. Have the path track target the next path track, and so on (give each other a name, and target them. If you do it right, you should see a yellow line connect them in order).

Now, you remeber the origin brush embeded in your train? Place that portion of the train on the first path track (not just the origin brush, the ENTIRE train). Now set the train's first stop target to the first path track. Now enter in wheel height, train speed, and so on. These can be entered in path_tracks, and in the tracktrain.

Okay boys, add on to this? :biggrin:
Re: How to make a train Posted by omegaslayer on Wed Dec 1st 2004 at 3:39am
omegaslayer
2481 posts
Posted 2004-12-01 3:39am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
I would say lets wait for the full sdk before attempting but here:

It depends upon what you want. GB did a good job of explaining it (cant
believe I just said that). Only make sure you have the train facing
east (or west I cant remember at the moment) in world craft so it know
where the front is and where the back is.

you can use a func_tracktrain to make it controlable by the user with a
control, or you can use a func_train to make it just follow a path that
is triggered to make it move (what you want to use I believe). Here you
do what GB said and place the train with its origin where you want the
first path_track. And give it a name so you can activate it some how,
and as the first stop where you the train to start at.

Now how do you want the train to move? If you want it to turn toward to
where you want it to go you use "path_track". And here ill expand on
what GB said:

Path_track 1:

name: a1

next stop:a2

path_track 2:

name: a2

next stop: a3

path_track 3:

name: a3

next stop: a4

etc.... Now if you want it to loop around then you have a loop of path
tracks and have your last one...maybe path track 20 have its next stop
field the name of your first (if you followed my example then that
would be a1). You can also use the path tool that comes with hammer,
but im a little skechy on it.

Im basing this off of the notion that HL2 mapping is simmilar (train
wise) to HL1, also check out:
http://collective.valve-erc.com/index.php?ent=func_train for further
info on trains.

edit:/// found out that there is only track train to use, no func_train, so do what I sain with func_tracktrain.
Re: How to make a train Posted by ManO-TPF on Wed Dec 8th 2004 at 12:05am
ManO-TPF
11 posts
Posted 2004-12-08 12:05am
ManO-TPF
member
11 posts 21 snarkmarks Registered: Nov 23rd 2004 Occupation: Pastor Location: USA
BTW, I got so wrapped up in this I forgot to say thank you. That did the trick. I will post my map later tonight I hope.
Re: How to make a train Posted by Nanodeath on Wed Dec 8th 2004 at 12:32am
Nanodeath
356 posts
Posted 2004-12-08 12:32am
356 posts 66 snarkmarks Registered: Nov 11th 2004 Occupation: Student - Bioengineering Location: Seattle, WA, USA
I think we'll just assume you meant "wrapped" and move on...
Re: How to make a train Posted by Static88 on Tue Jan 4th 2005 at 11:01am
Static88
122 posts
Posted 2005-01-04 11:01am
Static88
member
122 posts 52 snarkmarks Registered: Dec 31st 2004 Occupation: USMC Location: USA
Now does the train HAVE to be a brush, or is it possible to use the train models provided by Hammer? Also, am I understanding that you need an origin brush tied to the train or does the origin brush need to be at every turn? Thanks in advance.