Custom Payload Going Backwards Looks Horrible - Have an Idea, but Need Help!

Discussion in 'Mapping Questions & Discussion' started by Forthex, May 8, 2009.

  1. Forthex

    Forthex L2: Junior Member

    Messages:
    80
    Positive Ratings:
    12
    I'm working on a payload map, but instead of the normal bomb cart, I wanted to use another vehicle, so I wanted to use a truck or a van. This adds a few couple of tweeks to the standard push mechanic; BLU can only push when outside of the van (and not in front of it, only on the side or behind it), BLU can only heal/pick up ammo when inside of the van, and finally, every player inside the van deducts from one person pushing the van (more people inside = more weight = more work for pushers = net # of pushers goes down).

    So, I finally figured out how to make the truck move and look normal, like it had front-wheel steering. When moving forward, it goes over inclines and declines like any average truck would:

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    The path_tracks are half-buried in the ground, making the actual path parallel to, and touching the ground. Also the func_tracktrain is positioned so that its x/z middle is where the back wheels touch the ground, as shown in the above pics, its "Change Angles" is set to "Near path_tracks", its "Height above track" is set to "0", and it's "Distance Between the Wheels" is set to "180" (The distance from the contact point of the back wheels to the ground and the front wheels to the ground).


    All of these factors allow the truck to go over inclines/declines/turn like a normal truck with front steering would... when going forwards.

    However, there is HUGE problem when it start to roll backwards:

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    As you can see, the "distance between the wheels" value of "180" also applies in the reverse direction, and it completely screws up any normal look of a truck going backwards up or down a hill.

    I tried adding another func_tracktrain to the front wheels, giving it a "truck_train_reverse" name. I put it on the same set of path_tracks as the original func_tracktrain and parenting the func_brush and everything else to "truck_train_reverse", but that crashed the game.

    I tried creating altpaths for the "truck_train" to jump onto when it started to move backwards, but that also crashed the game.

    My next idea was to have an invisible, non-solid clone of the truck "follow" the original truck on its path. This "clone" truck would have its func_tracktrain on the front wheels so that when it's rolling backwards, it would look normal (but not when going forwards). The clone would disable and hide the original truck when it starts to reverse, and enable and unhide the new truck. When a player touched the clone's trigger area, the new truck would disable and hide, and the original truck would enable and unhide. This way, the truck, even moving backwards to the player, would look normal.

    But, whenever I tried this latest idea on my own, again, the game crashed. Any help?
     
  2. Forthex

    Forthex L2: Junior Member

    Messages:
    80
    Positive Ratings:
    12
    Nobody can help? Really? Hmm...
     
  3. SuperNerd

    SuperNerd L2: Junior Member

    Messages:
    60
    Positive Ratings:
    6
    I think it's a problem to do with the origin of the func_tracktrain.
    Because when you reverse, it would change the distance between wheels around the origin or something.
     
  4. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,682
  5. Forthex

    Forthex L2: Junior Member

    Messages:
    80
    Positive Ratings:
    12
    1 set forwards, 2 steps back. I fixed this problem, but 2 more have cropped up :( . I've got another work around in mind, but I've yet to block it out and test it.

    When fully get this working, I'm gonna write a two-axle payload tutorial. The entity set up is a bitch.