koth_* round-end event.

KWiP

L1: Registered
Jun 13, 2011
5
1
Hello all, first thread, be kind :D

I'm currently working on a conversion of my first cp map, converting it into a king of the flag (aka keepaway) map.

I currently have all of the entities and outputs arranged so the map functions just as it should; A team's koth timer decrements while one of their teammates is holding the flag, and the timers pause when the flag is dropped.

My only problem is that when one of the timers reaches zero, I cannot for the life of me get the flag to capture and award a point (Instead the administrator comes on and gets stuck in a loop screaming (OVERTIME!").

The way I currently have it set up is by way of a func_capturezone that covers the playable areas of the map which starts disabled. What I need is an output that will trigger once a team's timer reaches zero so I can temporarily enable this point (or if anyone can think of a better way to do this, I am open to suggestions).

tl;dr -
Does anyone know of an output that triggers when a team's timer runs out in a koth map?

Thanks in advance!
~KWiP
 
T

The Asylum

tl;dr -
Does anyone know of an output that triggers when a team's timer runs out in a koth map?

Thanks in advance!
~KWiP

you're using tf_logic_koth, right? If so, you'll also be needing two tf_round_timers, one for red and one for blu. Set their lengths to whatever the timer length is in tf_logic_koth, and have them fire an OnFinished output
 

MangyCarface

Mapper
aa
Feb 26, 2008
1,626
1,325
I set up something like this, it's much harder than I had thought
First, you can't just enable/disable the cap zone IIRC; it's a trigger, so if it's enabled while the player is inside of it, it won't detect the capture. Set it above the playing field and tie it to a func_door that closes downwards.
next you'll need a logic timer, and two math_counters
Finally you'll need a logic_branch.
When a team captures the point (ie is holding the flag) set the branch to 0 for RED and 1 for BLU. Whenever the flag is being held (not down or returned) you need that timer to be on. Every time the timer ticks (have it tick every second) tell it to Test the logic_branch. On False, have the branch add 1 to red's math_counter, and on True, 1 to blu's. Set the math counters equal to the time it'd take for a team to win (usually 180s) and onhitmax trigger the cap zone. Messy and sometimes inaccurate by a second or two but functional.

Better idea: Make it a necessity for any team to win by capping the flag in the center after their time has run down.
 

KWiP

L1: Registered
Jun 13, 2011
5
1
Thank you all for your suggestions, I will be trying these tonight!

~KWiP
 

Da_Man

L4: Comfortable Member
Aug 23, 2009
173
39
Gerbil did it in koth_dropdown, hit him up on how to do it. Logically, it should be just having the explosion in question go off when the timer hits zero, which i don't know the inputs and outputs offhand. Or just have OnTeam1Win and OnTeam2Win and have teh exact same thing happen on both. however, the SDK doesn't always follow logic, does it?
 

KWiP

L1: Registered
Jun 13, 2011
5
1
I apologize for the delay, it's been a long time in between, I know; I've been super busy the last few weeks.

I tried both ideas above, and I'm still having issues.

A) I tried the door/capzone idea, but the func_capzone doesn't have a parent property so i can't get it to follow the door, and when I tie it to the door as a single entity, it of course loses all of its attributes and becomes a big, solid block of trigger.

B) I tried the dual round_timer idea, but this has a problem of its own. I have all of the triggers and outputs in place so that when one of the timers runs out, it should reset the flag and add a point to the correct team. However, the triggers from these timers never seem to fire, and upon further investigation, I'm starting to suspect that round_timer entities don't actually function (normally, at least) while kotf timers are running.

Currently, I'm trying to set up a new structure using logic_timers, I'll get back to you all once I figure out whether or not that will work.

In the meantime, any additional suggestions would be immensely appreciated.

~KWiP
 

Empyre

L6: Sharp Member
Feb 8, 2011
309
187
You might try turning off smart edit and adding in a parent field/key/or-whatever-it-is-called. First, select an entity that does have a parent and turn off smart edit to see what its proper name is. If it work, then great, problem solved. If it doesn't, then you only wasted a few minutes.