How to make a train+track

Discussion in 'Mapping Questions & Discussion' started by DrSquishy, Oct 23, 2017.

  1. DrSquishy

    DrSquishy L8: Fancy Shmancy Member

    Messages:
    500
    Positive Ratings:
    106
    How can I make a train in hammer? I'm interested in the train itself, how to make the logic for the train and what props to use, anything that would help me be able to fully implement a train into my map.

    Thanks in advance!
     
  2. henke37

    aa henke37

    Messages:
    1,876
    Positive Ratings:
    440
    It is fairly simple, use a func_tracktrain for the train itself and path_track to define the path(s) it takes. If you want to use a prop instead of a brush for the train, parent a prop_dynamic to the tracktrain.
     
    • Thanks Thanks x 1
  3. DrSquishy

    DrSquishy L8: Fancy Shmancy Member

    Messages:
    500
    Positive Ratings:
    106
    What prop do I use for the tracks, and how do I make it look back around?
     
  4. henke37

    aa henke37

    Messages:
    1,876
    Positive Ratings:
    440
    You can use any props you like for the tracks. Some maps don't even have any! They just paint the tracks onto the ground with a texture. Really, just use the property browser to search for "track", it's sure to find plenty.

    As for making the train loop, just set the next stop of the path_track to a previous node. Nothing special needed! Or, if you don't want a loop, but the train to teleport back, try the teleport to this track spawnflag for the path_track. There is also supposed to be some teleport input for the tracktrain, but VDC doesn't seem to list any...
     
    • Thanks Thanks x 1
  5. Powerlord

    Powerlord L3: Member

    Messages:
    124
    Positive Ratings:
    58
    Wouldn't it just be TeleportToPathTrack ? I always assumed this is what mappers used to teleport trains in on a timer.
     
  6. DrSquishy

    DrSquishy L8: Fancy Shmancy Member

    Messages:
    500
    Positive Ratings:
    106
    The teleporting onto the next track worked fine with the flag; only problem is that I have a very long train, so may need to do multiple trains, each tied to a different section of the train props so it teleports over time, not 1 massive teleport.
     
  7. Vel0city

    aa Vel0city func_fish

    Messages:
    1,909
    Positive Ratings:
    1,530
    That, or you just make the train extend into the skybox for as long as you need and until it's completely invisible for players, then teleport it back. Maps like Cactus Canyon and Freight do this.
     
  8. DrSquishy

    DrSquishy L8: Fancy Shmancy Member

    Messages:
    500
    Positive Ratings:
    106
    How would I make it seamlessly extend into the skybox? I would want something similar to the banana bay train, where it goes through part of the map, and disappears off into the distance.
     
  9. Vel0city

    aa Vel0city func_fish

    Messages:
    1,909
    Positive Ratings:
    1,530
    Make it go in a tunnel behind a black brush. Then extend the tunnel to the lenght of the train you're trying to teleport back. Do the same for the starting point of the train.
     
    • Thanks Thanks x 1
Tags: