Accelerating and braking trains, slowly changing speed

  • Site Migration: See bugs? Report them here. Want something changed or have an idea? Suggest it here.


L2: Junior Member
Jan 2, 2019
Dear mappers, I have a problemo.
I want to make a func_tracktrain which slowly changes speed after a while and stops for 10 second, and then accelerate again to the maximum speed, but it should not be instantaneous, but slowly, just like in real life. I have tried to change parameters like 'Change velocity' but I don't know how to use them really.
Currently I have a func_tracktrain with two path_tracks and a logic timer which is set to one minute. The train works fine, but the custom speeds I want it to have don't.
Can anybody provide me with a solution or some sort of hint?

And yes, this is supposed to be a train stopping at a station, like the train stopping in Banana Bay when the bomb explodes.
Oct 6, 2008
two ways:

1. You could decompile the opening of hl2 map - train inbound to station if you want to go that sophisticated and it might be the bset way to get a smooth ride.
2. Use the change velocity method - multiple path tracks required for more control < easier this way as you no longer need to know how long the track is to get the effect you're looking for plus easier to adjust by movinf the path_track nodes forwards or backwards.

i.e. cart is moving along track at let's sat 100 units

Node 1 - train speed 100 with change velocity
Node 2 - train speed 75 with change velocity
Node 3 - train speed 50 with change velocity
Node 4 - train speed 25 with change velocity
Node 5 - onpass stop train - trigger timer - timer set to 10 secs at 10 start train forward
Node 6 - 10 - ramp up the speeds until you get back to 100 or whatever you want your new speed to be