[Download] Payload Rollback and Rolldown

qpingu

L1: Registered
Jul 5, 2008
25
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.
 
Last edited:

PenPen

L5: Dapper Member
Apr 24, 2008
207
136
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.
 

qpingu

L1: Registered
Jul 5, 2008
25
9
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.

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.
 

PenPen

L5: Dapper Member
Apr 24, 2008
207
136
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?
 

PenPen

L5: Dapper Member
Apr 24, 2008
207
136
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.
 

Aki

L4: Comfortable Member
Nov 2, 2009
155
8
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

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.
 

Fruity Snacks

Creator of blackholes & memes. Destroyer of forums
aa
Sep 5, 2010
6,394
5,571
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?

There was a time when you couldn't just check a flag on the path_track to set a rollback zone.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
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)
 
Oct 6, 2008
1,948
446
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?