Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Combine Train

From HalfLife 2 Knowledge Base

Jump to: navigation, search

Combine Trains

by Saan

Contents


Description

The aim of this tutorial is to make a moving non-controllable train as seen in d2_coast_07 (the one that tries to knock you off the bridge)

    This method can be expanded to make all kinds of moving things eg. an elevator etc

Conctruction

  • Make a simple hollow box about 4000 long and with a cross section of about 400x400
    This is the room we will build our train in
  • Now we need to place some paths for the train to follow, this is done with a path_track entity. Create two, one at each end of the room. Name the first one "train_start" and the second one "train_stop"
  • In "train_start" properties change the "Next Stop Target" to "train_stop"
     This sets it up so that as soon as the train hits the start it will move to the stop


  • Create a brush with the invisible texture and tie it to the entity func_tracktrain (by pressing ctrl-t)
  • Set its initial speed to 0 and its max speed to about 300-400
     Warning - func_tracktrain is solid beware of it hitting the player etc
  • This entity will be the controller that all the other parts of our train are related to, they will follow (or lead) it by how much they are seperated in Hammer.
     i.e. if a train car is off to the left and back a bit then it will follow the "train master" 
     by being off to the left and back abit.  This makes it necessary to place the train models in 
     the right place so everything will look good
  • Name this entity something like "train master" or whatever
  • Change its "First Stop Target" to train_start
  • Place a model of a train right ontop of the "train master" as prop_dynamic and change its parent to "train master"
     The Combine trains can be hard to find, they are in /props_combine/ and the names start with Combine
     eg models/props_combine/CombineTrain01a.mdl is the engine
     You can add more than one car to the train, just set them up in so they are all together and change their parent
     to "train master"
  • Create a trigger somewhere nice and easy to walk into and setup an output as follows
     OnTrigger | train_master | StartForward |  | 0 | No
  • Load up you map and walk into the trigger
  • The rest of the options are rather self explanatory, other things you will want to do is add sounds and maybe a screen shake
Personal tools