CTF Timer Logic

CTF Timer Logic v2

pont

rawr
aa
Mar 15, 2018
346
523
CTF Timer Logic - CTF timer integration setup with full support for overtime

View attachment 133160
Ripped straight from my Pick It Up! contest map a20.

Adding a game timer to CTF by default will force a stalemate at 0 regardless of score, or will be in overtime until both flags return to base. This fixes that, as well as a few other things.

Features:
- Round timer
- Adding time when a capture is made by the losing team
- Respawning the team whose flag just got captured
-- (...unless they're about to lose)
- Correctly awarding wins to the leading team when the timer runs out
- Correctly calling stalemate if scores are tied when the timer runs out
- Going into overtime if the losing team is carrying the enemy flag and are trailing by one point
-- In this scenario; awarding the leading team a win if the losing team drop the flag
- Going into overtime if scores are tied and both teams are holding the flags
-- In this scenario; awarding the team who captures first a win
-- In this scenario; awarding a win if the enemy team drop their flag
-- In this scenario; adding bonus time if teams capture at roughly the same time
- Other weird edge-cases to do with overtime
- No hardcoded score limits, so this will work on servers that change the capture limit
 

pont

rawr
aa
Mar 15, 2018
346
523
v1.x of this logic was created during the Pick It Up! contest - as such, it was a hacky mess of tacked-on functionality. v2 is a complete remake of the logic from the ground-up.

Changelog:

- Remade logic and diagram entirely - it's readable now!
- Almost every entity has an editor comment attached.
- Prefab includes commented func_details, to help visualise the entities against the diagram.
- Faster and simpler, relying on less interrupting delayed relays.
- Same featureset as v1.3.
- Fixed conditional bonus time.
- Fixed forcespawning into a round loss.

Updating from previous versions of this logic is as simple as ripping the old one out (teamflags included) and dropping this one in its place.

io_v2.png
io_v2 prefab.png

Read the rest of this update entry...
 

RatsInYourWalls

L5: Dapper Member
Jun 20, 2020
213
82
I'm using this in my 2fort reskin. Can I add you as a contributor on steam?
 

Radial

aa
Aug 4, 2019
166
43
Hey, think you could make an update so that this logic can handle setup time, or show me how? I like having a slight 3-5 second buffer without eating into main round time. In the current version, the map instantly stalemates once setup time runs out, if it exists.
 
Last edited:

pont

rawr
aa
Mar 15, 2018
346
523
hi! it's been a hell of a while since i've touched this and i'm very fatigued from a recent move, so forgive me if this doesn't work - try adding an additional relay where the game time unit enables/disables the flag state check unit's proxy relay. the fscu handles all the overtime win/stalemate awarding, so a relay in the mentioned position that begins disabled and is only enabled after setup time runs out should get the behaviour you want. refer to the included IO diagram for an idea of how it all fits together - it roughly matches up to the position of entities in the prefab. good luck with your map! :3
 

Radial

aa
Aug 4, 2019
166
43
hi! it's been a hell of a while since i've touched this and i'm very fatigued from a recent move, so forgive me if this doesn't work - try adding an additional relay where the game time unit enables/disables the flag state check unit's proxy relay. the fscu handles all the overtime win/stalemate awarding, so a relay in the mentioned position that begins disabled and is only enabled after setup time runs out should get the behaviour you want. refer to the included IO diagram for an idea of how it all fits together - it roughly matches up to the position of entities in the prefab. good luck with your map! :3
Couldn't figure this out myself but I did find a solution! The only thing actually enabling the FSCU proxy relay is relay_enterOvertime, so I simply have that start disabled and enable it once setup is over. Turns out the OnXTimeRemaining outputs fire for setup as well.