[Download] Payload Rollback and Rolldown

Discussion in 'Mapping Questions & Discussion' started by qpingu, Aug 9, 2009.

  1. qpingu

    qpingu L1: Registered

    Messages:
    25
    Positive Ratings:
    9
    Regular payload gets no love now thanks to payload race and its different gameplay. One thing I've always wanted to see in existing payload maps is for the cart to react to hills, in that it will roll backwards down a hill if not pushed and will roll forward down a hill regardless of whoever is pushing. This is made harder because the cart on traditional payload maps recedes when not pushed after an amount of time.

    Of course, I've worked out a complicated but actually quite simple series of logic for adding hills to payload maps. Payload race maps could also use this system, but you'd have make a copy the 6 logic entities I created for the blu and red cart.


    Download:
    http://forums.tf2maps.net/downloads.php?do=file&id=2134


    Features:
    - Cart will roll back down a hill if nobody is pushing it up.
    - Cart will recede faster down a hill.
    - Cart will roll down a hill (in forwards direction) at full speed regardless of who is pushing.
    - Cart will not recede back up a hill and will stop there.


    Bugs:
    - The rolldown is accomplished by temporarily disabling the triggerzone, which causes some classes to say something ("Who stopped pushing the cart?").
    - The cart sometimes ends the rollback at odd angles.


    Included is a ported version of ABS' 5-stage payload (down to 2 stages to make room for the hill) from the amazing gametype library. With that setup, all you need to do to get the rollback and rolldown effect is to call the proper logic entities based on the location of the track.


    Bottom of hill (going up):
    OnPass - sspl_rollback_bottom - Test

    Top of hill (going up):
    OnPass - sspl_rollback_top - Test

    Bottom of hill (going down):
    OnPass - sspl_rolldown_bottom - Test

    Top of hill (going down):
    OnPass - sspl_rolldown_top - Trigger


    The system is very easy to remember, except for the one Trigger instead of Test. You can use ABS' payload system (it appears to be working fine), or you could convert your own map to use the rollback and rolldown system I created.

    In order to convert, you need to tweak a few things:


    - Put the 6 logic entities I created (5 logic_branch and 1 logic_relay) somewhere on your map.
    - Make your track pieces call the right logic entities as shown above.
    - Edit these existing entities:

    trigger_capture_area
    Add - OnNumCappersChanged - sspl_rollback_recede - SetValue - 0

    team_train_watcher
    Add - OnTrainStartRecede - sspl_rollback_recede - SetValue - 1

    logic_case (the case that controls the cart's speed based on players capping)
    Add - OnCase01 (0 capping) - sspl_rollback - Test
    REMOVE - OnCase01 (0 capping) - sspl_train - SetSpeedDirAccel - 0
    REMOVE - OnCase01 (0 capping) - sspl_cartsparks - StartSpark



    That's it. You may need to tweak things a bit to get it to work (this is from memory, I might be wrong), but it is pretty straight forward.
     
    • Thanks Thanks x 7
    Last edited: Aug 9, 2009
  2. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,818
    Positive Ratings:
    4,660
    Nice! Look forward to seeing this in regular payload maps in the future!
     
  3. PenPen

    PenPen L5: Dapper Member

    Messages:
    207
    Positive Ratings:
    69
    Thank you. Was about to ask about this and now you have read my mind. :D
     
  4. PenPen

    PenPen L5: Dapper Member

    Messages:
    207
    Positive Ratings:
    69
    Stupid question time: If I want to modify the rolldown speed of the cart when it goes downhill (say it goes faster by itself than its normal speed), how would I change that? Many thanks.
     
  5. qpingu

    qpingu L1: Registered

    Messages:
    25
    Positive Ratings:
    9
    The cart rolls back thanks to sppl_rollback when it sets the acceleration to -1. You can't go any lower than -1, so you need to increase the movement speed of the cart itself and scale every other speed change so that they end up being the same.
     
    • Thanks Thanks x 1
  6. PenPen

    PenPen L5: Dapper Member

    Messages:
    207
    Positive Ratings:
    69
    Thanks but I actually meant the rolldown going forwards. But I'm going to assume that the logic works pretty much the same as what you said above...yes?
     
  7. PenPen

    PenPen L5: Dapper Member

    Messages:
    207
    Positive Ratings:
    69
    Oh, I actually figured that myself. Just set the maximum speed of the cart higher, and then in the push speed entity I just fool around with the multiplier. Nice.

    On another note, in-between normal pushing and the rolldown start path points, there's a chance that the cart will get stuck as it can't be pushed. This happens when I was pushing the cart and then decided to move away from the cart for a short second. The push feature is disabled and you will have to wait until it does the rollback, where the cart somehow fixes itself by moving backwards a bit, and then going forward. Then it's back to normal.
     
  8. Aki

    Aki L4: Comfortable Member

    Messages:
    155
    Positive Ratings:
    4
    Why did you use rar compression instead of zip? Windows systems do not come with that compression scheme by default. I'll go hunt a rar unpacker down, but it's an annoyance.
     
  9. Deodorant

    Deodorant L6: Sharp Member

    Messages:
    263
    Positive Ratings:
    161
    Am I dumb? I don't understand. There are already inclines in regular payload maps that cause the cart to roll automatically. The ramps on Thunder Mountain, that spirally thing on Upward.. What am I missing here?
     
  10. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,902
    There was a time when you couldn't just check a flag on the path_track to set a rollback zone.
     
    • Thanks Thanks x 2
  11. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    Sometimes I think forum software needs to make the date show up in bold, red, 30pt font if the post is older than 3 months. It would save so much trouble.

    (this thread is outdated material, in all but exceptional cases)
     
    • Thanks Thanks x 3
  12. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,597
    Positive Ratings:
    1,677
    can be sorta useful if you're going to do tug of war rolldown/forward

    not entirely useless, stop hatin you ppl
     
  13. Kill_the_Bug

    Kill_the_Bug L14: Epic Member

    Messages:
    1,454
    Positive Ratings:
    234
    sorry for the bump - I can get this working on a single stage map - but it breaks down when I get it into the multi-stage version - what am I doing wrong?