How to make a trian like the one in over pass.

So i made a train track go over a tunnel ,see here

But, i like it just it would be better if it went over and made a train noise like the one in de_overpass, its just for the looks and players cant go up their without noclip, how could i do this?

Please dont comment about the rest of the map its an old screen shot just the train has not changed :wink:

What do you exactly mean? You want a moving train? You do realize that the “train” you put on the map consists of stationary models right?
In order to make it move you need a func_tracktrain, path_tracks and parent the models to the func_tracktrain.

How do i make it so that its model is of that train model? I cant see a place to put the model path etc.

How do you make that model that is of that train model?

Isn’t it already that mode? :why:

when i change it to the train model it changes to a circle in the ground :confused:

Love that train idea… Ever think of maybe doing a train bridge instead of a tunnel?

use a prop_dynamic with that train as model.
create a nodraw brush, 16x16x16 (size of most point entities when placed in hammer), you convert it into func_tracktrain.
Put it at the prop origin.

Parent the prop to that tracktrain.

Put 3 path_track in the way. 1 at beggining 1 at the end, and 1 in the visible area.
For the middle one, make it:
OnPass sound,PlaySound,0,-1
for the sound, create a ambient_generic playing from that train, with a train sound (it’s up to you).

For the first path track put:
OnTeleport !activator,StartForward,0,-1
For the last path track put:
OnPass !activator,TeleportToPathTrack,path1,0,-1
(Path1 or something else, use the first path name).

Just configure the func_tracktrain speed, and initial speed, so it move when the map spawn.

Hope it helped.

The problem is he does not understand the train model is not the same as a train entity.

Just replace the razor train models with the ones you want to use.

If an entity doesn’t have a specific “model” property, it isn’t supposed to have one.
In this case, the “train” itself is just an invisible box that moves along a path and the props that make up the visible train are just a purely visual effect that moves (is “parented”) with that invisible box.

The basic thing you need to know is that a prop_static can’t move at all.
A prop_dynamic can move when “parented” to another object or animated.
And a prop_physics moves when pushed around by the player or gravity etc.
(I’m sure there’s exceptions to those rules, but for the majority of the time that’s the case)

So if you want a prop to move along the track it should be a prop_dynamic, which is then “parented” to an invisible box that moves along the track.

No, I was but, I will upload a screen shot later to explain why :slight_smile:

[editline]25th September 2015[/editline]

Ok, but how do I make it reoccurring, so it goes pass like every 2 mins or so, also can I parent a sound to it?

[editline]25th September 2015[/editline]

Also, they’re two trains in GreenRiver city, one of wich goes around the whole map, and players can enter it, have a look at a few screen shots, I’ll post them in a second :wink:

I will redo my post with few modification:

use a prop_dynamic with that train as model.
create a nodraw brush, 16x16x16 (size of most point entities when placed in hammer), you convert it into func_tracktrain.
Put it at the prop origin.
Name it tracktrain or what you want. And set it’s MaxSpeed (not Initial Speed).

Parent the prop to that func_tracktrain.

Put 3 path_track in the way. 1 at beggining 1 at the end, and 1 in the visible area.
And another one in a black room or nodraw room, somewhere people cant go/see. We will teleport the train there once he pass the last path track.

Create a ambient_generic, name it train_sound. For the sound, you will find few good from hl2.

For the middle path, add this output:
OnPass train_sound,PlaySound,0,-1

For the first path track add:
OnTeleport !activator,StartForward,0.1,-1
For the last path track put:
OnPass !activator,TeleportToPathTrack,path4,0,-1
(Path4 or something else, use the name of path_track in the nodraw room).

Now to make it come every 2 min, use a logic_timer.
Name it train_timer.
Set its RefireTime Interval to 120.
Add one output:
OnTimer tracktrain_name,TeleportToPathTrack,path1,0,-1

And with a logic_auto,
OnMapSpawn train_timer,FireTimer,5,-1
This will trigger the output of the timer 5 seconds after the map is loaded, and then every 2 minutes the train will come.

Hope it helped.