Control Point Elevator (Matches Cap Progress) a3
Allows variable cap rate and blocking!
A control point elevator that moves upward, matching the progress of the capture at all times.
The entity
Instead, this prefab manually sets the elevator's speed depending on the rate of capture, supporting up to 32x capture rate at once by default. As a result, if you'd like to change the height of the elevator or the time to cap, you'll need to adjust the speed values, described below:
CHANGING ELEVATOR HEIGHT/CAPTURE TIME
Important entities:
1. func_door (cap_elevator)
2. trigger_capture_area (capzone_c)
3. logic_case (elevator_pushingcase)
4. logic_branch (overtime_speed)
To calculate the speed for every other case, multiply the
For instance, case02, or at a x2 capture rate, the rate is 150%. 22.5 * 1.5 = 33.75. case03, 183%, 22.5 * 1.83 = 41.175, etc.
To save yourself some trouble use this graph: https://www.desmos.com/calculator/xnyjuh0iva and set "a" to be the
In TF2, control points decay at 100% capture progress over 90 seconds. I chose 16s and 360 HU because 16s and 90s both divide 360 cleanly, but this is not necessary.
The default falling speed (onFalse) is
The overtime falling speed (onTrue) is the default times six, 4*6 = 24
OTHER NOTES:
- The func_brush below the elevator is named sawmovelinear01. Parent any solid props used on the elevator to this instead of cap_elevator to prevent stickies from sticking to them.
- The team_round_timer has outputs relating to overtime falling speed. Make sure to keep them.
- There are emergency lights that change color and animations based on the current state of the cap.
- Ragdolls fall through the platform. LMK if there's a working solution for this.
- If for some reason you need to cover over a 32x cap rate, duplicate the elevator_pushingcase and change the cases to cover your needed range.
This hasn't been tested on an actual server yet, just bots, so let me know if there are any issues.
The entity
trigger_timer_door
is not used as it does not allow variable cap rates, does not account for capture blocking, and greatly increases capture decay rate.Instead, this prefab manually sets the elevator's speed depending on the rate of capture, supporting up to 32x capture rate at once by default. As a result, if you'd like to change the height of the elevator or the time to cap, you'll need to adjust the speed values, described below:
CHANGING ELEVATOR HEIGHT/CAPTURE TIME
Important entities:
1. func_door (cap_elevator)
2. trigger_capture_area (capzone_c)
3. logic_case (elevator_pushingcase)
4. logic_branch (overtime_speed)
cap_elevator
controls the distance the elevator travels through it's thickness (16) plus the lip (344) for a default of 360 HU. Adjust the lip to the desired height and keep note of the total distance
.capzone_c
controls the time to capture. In TF2, the value specified is half as long as it takes capture at 1x cap rate. The default is 8s, for a 16s base capture time
.elevator_pushingcase
controls the speed of the elevator. The base speed (case01) is distance
/base capture time
. 360/16 = 22.5 HU base speed
. There are two of these, with the same name, to cover 32 cases.To calculate the speed for every other case, multiply the
base speed
by rate
for that number of cappers, found here: https://wiki.teamfortress.com/wiki/Control_point_timing#Base_capture_timesFor instance, case02, or at a x2 capture rate, the rate is 150%. 22.5 * 1.5 = 33.75. case03, 183%, 22.5 * 1.83 = 41.175, etc.
To save yourself some trouble use this graph: https://www.desmos.com/calculator/xnyjuh0iva and set "a" to be the
base speed
to populate the table with the correct speeds.overtime_speed
controls the falling speed of the elevator, accounting for overtime in which decay is 6 times faster.In TF2, control points decay at 100% capture progress over 90 seconds. I chose 16s and 360 HU because 16s and 90s both divide 360 cleanly, but this is not necessary.
The default falling speed (onFalse) is
distance
/decay time
. 360/90 = 4The overtime falling speed (onTrue) is the default times six, 4*6 = 24
OTHER NOTES:
- The func_brush below the elevator is named sawmovelinear01. Parent any solid props used on the elevator to this instead of cap_elevator to prevent stickies from sticking to them.
- The team_round_timer has outputs relating to overtime falling speed. Make sure to keep them.
- There are emergency lights that change color and animations based on the current state of the cap.
- Red = Capturing (progress_relay)
- Grey = Falling/idle (regress_relay)
- Yellow = Blocked (hold_relay)
- Blue = Captured (cp_c)
- Ragdolls fall through the platform. LMK if there's a working solution for this.
- If for some reason you need to cover over a 32x cap rate, duplicate the elevator_pushingcase and change the cases to cover your needed range.
This hasn't been tested on an actual server yet, just bots, so let me know if there are any issues.