- Jun 16, 2009
- 49
- 30
Alright, I've mucked around with the train a bit a couple nights ago and did get it working, though I did not play around with any of the logic timers and skybox train and the lights. I'll soon study cp_Well more in depth when I finish DEV'n out my map for alpha.
This tutorial is help you understand basic of the train, if you've done a playload then path_tracks should come to relative ease
So we are going to start off with the basic layout for the train, with textures. Just to get a simple look at where your train will be.
Figure #1

Alright sense we have the layout down we can get our path_tracks ready. So I set an entity at the left end of the map and make that entity path_track.
Now we will name that path_track to something easy and nice to remember, but it's your choice to name what you feel.
Figure #2

Now get another entity and make that a prop_dynamic and get a model you would like as the train because your going to have to align the path_track center with the model you choose, because of this that train is going to follow that path and if it's high then when you go to compile your train will be suspended in the air...I know the future isn't that far away but making this act like a train is the key, also name your Train something easy also, you'll figure out why in a moment.
Figure #3 I choose the Well train for this Tutorial

Once you have that centered from where you want that, now we will use a short cut, Valve has made it easy for use this. Hold shift and click and drag your next path where you would like it to be placed. I just put my at the end of the map and kept it straight. (Like said, if you are familiar with path_tracks this should come to ease)
Figure #4 The paths

After that is all done and make sure the paths are connected if not you can go to first path and just make the Next Stop Target the name of your second path and you should get them connected like figure #4.
Now create a nodraw texture and make it around the back of the train, try to get it even with the train with the sides don't make that nodraw really wide. Just look at my figure below:
Figure #5 NoDraw

now hit crtl+t to bring the options up, we will make the nodraw texture and func_tracktrain. Doing this will help move the train with the tracks. now click the train model and parent it with the func_tracktrain.
These are the options with the func_tracktrain and I'll help you out with most of them, because I haven't figured all of them out entirely.
Things we'll worry about for the train are:
1. NAME (Name your brush! I named mine train_train :laugh
2.FIRST STOP TARGET ( The first path that you had made, make sure that is the selection made)
3.MAX SPEED & INITIAL SPEED (Play around with these, making it obvious but lower the number slower it goes)
These are the basics to get the train working, I've only worked with the sound and velocity and height, but I encourage you to experiment with this stuff, I haven't gotten the time to do it properly.
Now tie the Brush to the model by just holding ctrl + click to select both then ctrl + t to tie them together, make sure you push yes when the window pops up, if you push no then a new entity will be created loosing your func_tracktrain
Now you have that all set, when you do compile your map it should move. If not there must be some things you missed, or my horrible teaching skills.
But what happens if you want it to loop from back and forth from paths?
All you have to do is go to your second path made and click Next Stop Path and link it back to your first. It should go back and forth, giving you a good idea on how the train works.
But I want it to go in a circle!
more path_tracks will do the trick, and remember to hold the shift and drag them because that will automatically link them, instead of having to do the manually. Then when you get around to your first path don't shift and drag again, double click on that last path_track and set Next Stop target to the first path_track, creating a loop. :cool1:
But how do I get the train to hurt me when I run in front of it?
trigger_hurt.
What we'll do is did what we did with the nodraw but use a trigger texture and put the trigger in front of the train and tie it to the train.
Also in the trigger_hurt's option in damage type use the FREEZE to get that train in the HUD.
Also look here for trigger_hurt options:
[ame="http://forums.tf2maps.net/showthread.php?t=6832"][INFO] Trigger_hurt damage types and effects - TF2Maps.net Forums[/ame]
Now this is my first tutorial and might...wait I know for a fact it has flaws but I'm open to questions, and i'll try answering them, I didn't know much about the train before and I got the concept it seems. Hopefully I can get the Well stuff figured out soon:thumbup:
Last edited: