Control Point Elevator (Matches Cap Progress)

Control Point Elevator (Matches Cap Progress) a3

Aug 26, 2016
137
101
Control Point Elevator (Matches Cap Progress) - Allows variable cap rate and blocking!

A control point elevator that moves upward, matching the progress of the capture at all times.

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 number of cappers, supporting up to 16 cappers 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_pushcase)
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_pushcase controls the speed of the elevator. The base speed (case01) is distance/base capture time. 360/16 = 22.5 HU base speed.

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_times

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 the trouble, use this desmos graph: https://www.desmos.com/calculator/xnyjuh0iva

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 1 capture per 90 seconds. I chose 16s and 360 HU because 16s and 90s both divide 360 cleanly.

The default falling speed (onFalse) is distance/decay time. 360/90 = 4
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.
  • Red = Capturing (progress_relay)
  • Grey = Falling/idle (regress_relay)
  • Yellow = Blocked (hold_relay)
  • Blue = Captured (cp_c)
Control these through their logic_relays or the team_control_point.

This hasn't been tested on an actual server yet, just bots, so let me know if there are any issues.
 
Last edited:

Freeze

L2: Junior Member
Apr 11, 2023
81
1
alright but if i wanted this elevator to work like a koth cp and go up and down is that possibal?