Train (and gates) lazy-person's prefab

Discussion in 'Tutorials & Resources' started by Freyja, Jun 16, 2014.

  1. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,884
    Positive Ratings:
    5,127
    This is just a VMF file containing all the logic required to make a train work.

    This is the logic setup I used in Keikoku (modified to be a single engine). It is fully commented so everything has a note on it to what it does, even includes gates.

    Notes:

    • Position the prefab wherever you like. The gates can be moved to any distance apart, they are triggered to open by the path node a bit in front of the doors, so as long as you keep the distance between the doors and the node it should work fine.
    • The doors close by default after 1 second, this works for the speed and length of the train, if you change those you'll need to adjust this accordingly
    • the entity called train_timer fires the train a random time between 30 and 50 seconds. Edit or disable the timer, and you can use train_start to fire it manually by any means you wish.
    • By default, warning bells are stopped when the train reaches the first gate. They're disabled by a node, so move that to wherever you wish the warning bells to end.
    • Will destroy buildings

    Download.
     
    • Thanks Thanks x 16
    Last edited: May 26, 2017
  2. Yabayabayaba

    Yabayabayaba L5: Dapper Member

    Messages:
    247
    Positive Ratings:
    73
    download broken:(
     
  3. Malachite Man

    Malachite Man L6: Sharp Member

    Messages:
    311
    Positive Ratings:
    152
    This post was made in 2014 that is why it's not working.
     
  4. HolySnickerPuffs

    aa HolySnickerPuffs Bad at TF2, Loves Mapping For TF2

    Messages:
    949
    Positive Ratings:
    1,297
    Also because Dropbox changed how public folders work and basically broke everything, but you're probably more right than I am.
     
  5. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,884
    Positive Ratings:
    5,127
    Fixed link. Sorry for the delay