How do I make that Watergate countdown thing?

arthurgps2

L1: Registered
Feb 11, 2018
32
0
So I'm working on a PD map, and I've got almost everything set-up to start making the map, but I wanna know how do I make that countdown timer we can see in Watergate, that turns the capturezone on and off after an amount of time. I even took a look at the tutorials in TF2Maps and the Steam Developer Community, but I haven't got anything. Can you please help me?
 

Egan

aa
Feb 14, 2010
1,375
1,721
In the middle bits of the PD guide are some extra commands you can send as inputs to the pd_logic entity: https://tf2maps.net/threads/player-destruction-guide.25958/

SetCountdownTimer <integer> Set the countdown time and start the timer.
SetCountdownImage <string> Set the countdown image.
OnCountdownTimerExpired Sent when the countdown timer expires.

If you just send the input to Set the timer it will automatically appear and start counting down immediately. The OnCountdown output will fire when it hits zero. The SetImage command will let you change the icon next to the countdown. See the PD guide link for more.
 

arthurgps2

L1: Registered
Feb 11, 2018
32
0
Ok, but for the capturezone to enable and disable every time the countdown hits 0 ,i need to create a math_counter and a logic_compare for it to work?
 

Narpas

Takes way to long to make and update maps
aa
Jun 11, 2015
433
436
If you want to have the capture zone enable when the countdown ends, you need to add an OnCountdownTimerExpired output to your pd_logic entity targeting your capture zone and telling it to enable; then, to disable it, you want to do the same as above but add a delay to the output. Keep in mind, though, that this will not play any voice lines, so you'll need to play them all manually somehow (how I got this to work was sending the same output to an ambient_generic with the sound I wanted with a delay of however long it would be from when the timer was triggered and reset until I wanted the voiceline to play)