Accelerating and braking trains, slowly changing speed

Discussion in 'Mapping Questions & Discussion' started by MrFlovi, Nov 4, 2019.

  1. MrFlovi

    MrFlovi L2: Junior Member

    Messages:
    53
    Positive Ratings:
    0
    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.
     
  2. MrFlovi

    MrFlovi L2: Junior Member

    Messages:
    53
    Positive Ratings:
    0
    Ping
     
  3. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,703
    Positive Ratings:
    351
    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
     
    • Thanks Thanks x 1