Help with....Moving a prop?

Discussion in 'Mapping Questions & Discussion' started by Vilzzex (ActionDevVito), Aug 27, 2016.

  1. Vilzzex (ActionDevVito)

    Vilzzex (ActionDevVito) L2: Junior Member

    Messages:
    78
    Positive Ratings:
    62
    So uh,i just GOT INTO hammer.Like,i am trying my best to get it,because i want to make both Garry's Mod and Team Fortress maps.I watched all tutorials made by UEAKCrash.I understand the input/output system and such,but i have a question.

    I want to make a prop_dynamic move forward,but that it has a Kill Trigger on the front of it,much like UEAKCrash did in his "trainsawlaser" map where the train that lands into the control point has a kill trigger at the front so it can kill the player.I want to make a prop horizontally land into a certain place on the map,with it killing everyone that stands on it's way.

    So how do i make it run into the certain place on the map,
    and how do i make the kill trigger stick on the front of the prop?

    Thanks in advance guys.
     
  2. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    To make the prop_dynamic move, you would want to parent the prop to a func_tracktrain. Func_tracktrains are a brush entity that have the capability of following a path that you have laid down for them to follow.

    You then would put down a path_track at where you want it to start, and name it path_1. Then shift+drag it to the next corner it takes / the end location if it wont need to be taking any corners. Next in the func_tracktrain, set the 'first stop target' to path_1, and the speed to whatever you want. Speed is measured in hammer units per second, so judge how fast you want it there. First stop target determines where the tracktrain and the prop you have parented to it start. Also, in the outputs tab of the last path_track in the path, create and output of 'OnPass - (name of your func_tracktrain) - TeleportToPathTrack - Path_1 (in parameter override)' Then create another output of 'OnPass - (name of func_tracktrain) - Stop'

    Next, you need something to trigger the tracktrain to follow the path. The best option is likely a logic_timer for what you want to do. A logic_timer can trigger some outputs every x amount of seconds. So you can have it set to, say 30 seconds, then every 30 seconds the train would go along the path then teleport back to the first path. Set the 'refire interval' to however long you want the gap to be, then in the outputs tab create an output 'OnTimer - (name of func_tracktrain) - StartForward'

    Now all you need to do is to create a trigger_hurt that is a big bigger than the func_tracktrain and the prop_dynamic, and set its damage to something high like 10000, and make sure that the func_tracktrain, prop_dynamic and trigger_hurt are all correctly in position ontop of eachother. If all is well and good, you should have a functioning train rain.
     
    • Thanks Thanks x 2
  3. Vilzzex (ActionDevVito)

    Vilzzex (ActionDevVito) L2: Junior Member

    Messages:
    78
    Positive Ratings:
    62
    Thanks a lot!
     
  4. iiboharz

    aa iiboharz Meme Queen

    Messages:
    707
    Positive Ratings:
    1,030
    Just a heads up! If your object only moves between two points, it might be worth looking into using func_movelinear or func_door for its movement instead!
     
  5. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,429
    Positive Ratings:
    1,173
    Func_tracktrains tend to be a nodraw brush approximately the size of the prop. Is some cases they also act as a rough collision box.