Help with....Moving a prop?

action

L2: Junior Member
Jul 11, 2016
78
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.
 

zahndah

professional letter
aa
Jul 4, 2015
721
642
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.
 

action

L2: Junior Member
Jul 11, 2016
78
62
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 a lot!
 

iiboharz

eternally tired
aa
Nov 5, 2014
857
1,291
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!
 

Crowbar

Spiritual preprocessor
aa
Dec 19, 2015
1,455
1,297
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.