Best way for train hazards?

Discussion in 'Mapping Questions & Discussion' started by Ctrl Alt Defeat, Jul 21, 2015.

  1. Ctrl Alt Defeat

    Ctrl Alt Defeat L1: Registered

    Positive Ratings:
    I couldn't find any in depth tutorial on this, so I figured I'd ask. For train hazards (such as those on Well or Freight), what's the best entities to use? There's so many different brush entities that can move. Would a func_tanktrain or a func_movelinear be better? What else would be needed for resetting position, etc?
  2. MaccyF

    aa MaccyF Notoriously Unreliable

    Positive Ratings:
  3. worMatty

    aa worMatty Repacking Evangelist

    Positive Ratings:
    You make a good point about needing to reset the position. func_movelinear can't have its position reset immediately. The train would need to go backwards at a fast speed, which would be noticeable.

    The simplest way is to use a func_tracktrain and a couple of path_track. When the train reaches the end path node, you can teleport it to the 1st using the TeleportToPathTrack output, and putting the name of the 1st path node as the parameter.

    Parent a trigger_hurt brush to the front of the train. Give the train the spawn flag 'Unblockable by player'. Then put a trigger_hurt brush inside the wall around the tunnel exit of the train. This is because players can stand on top of the train and can be pushed in to the wall brushes. The submerged hurt brush will kill them if they try to exploit this.