King of the Hill variant

Promethium

L1: Registered
Jan 2, 2010
4
0
Some of you may have played TFC, and those some of you may have played Murderball. I, like some others (I think), am trying to recreate that game mode.

With the addition of the KotH-style game type, I was hoping it would be very simple.

... Like most times, I was wrong.

For those of you who have no idea what I am talking about, I will explain Murderball.

Murderball was a custom game type in TFC where 4 teams vied for control over the murderball, which was placed in the center of the map. The longer your team held the murderball, the more points you would get. At the end of whatever time the server had the round time set to, the winning team was who had the most points because they held the ball the longest.

In TF2, I am attempting to recreate this by making a KotH variant. The objective will be simply to obtain the murderball (ie; the neutral intel) and hold it for 3 minutes. If you drop it, it will continue to count your team's timer down until the other team picks it up. First one to 3 minutes held wins the round.

Here is as far as I got:

item_teamflag entity:
OnPickupTeam1 -- tf_gamerules -- SetBlueTeamRespawnTime -- 4
OnPickupTeam1 -- tf_gamerules -- SetRedTeamRespawnTime -- 8
OnPickupTeam1 -- tf_gamerules -- SetRedKothClockActive
OnPickupTeam2 -- tf_gamerules -- SetBlueTeamRespawnTime -- 8
OnPickupTeam2 -- tf_gamerules -- SetRedTeamRespawnTime -- 4
OnPickupTeam2 -- tf_gamerules -- SetBlueKothClockActive


logic_auto entity:
OnMapSpawn -- tf_gamerules -- SetBlueTeamGoalString -- #koth_setup_goal
OnMapSpawn - tf_gamerules -- SetBlueTeamRespawnWaveTime -- 6
OnMapSpawn -- tf_gamerules -- SetRedTeamGoalString -- #koth_setup_goal
OnMapSpawn - tf_gamerules -- SetRedTeamRespawnWaveTime -- 6


and the tf_logic_koth entity.

From my understanding of how a normal intelligence works with the KotH game type, both teams attempt to capture a number of flags before the timer runs out.

My specific problem right now is that once the timer counts down to 0... nothing happens. No round win, no overtime mode, no sudden death (though I can't see why that would happen to begin with). I have attempted to add in triggers and filters like that of a Push or Neutral Intel game mode, and even CPI (Control Point Intel) with no luck, although I'm sure I'm doing it wrong in the first place.

If anyone has a solution, I'd love to hear it. As I've said in my introduction thread, I am a complete idiot when it comes to I/O's.

Thanks!
 

Undies

L1: Registered
Dec 24, 2009
45
9
Not sure I understand what you are aiming for, but since you didn't mention them I feel the need to ask, are you using game_round_win entities?
 

Fenderic

L1: Registered
Dec 9, 2009
13
3
i think i know what you are talking about,
King of the Crown is what it was called in whatever game i played it.
i'll try to whip something up in hammer to help you
 

Promethium

L1: Registered
Jan 2, 2010
4
0
Not sure I understand what you are aiming for, but since you didn't mention them I feel the need to ask, are you using game_round_win entities?

Had attempted that with no luck. It seems as though I need a func_capturezone to reset anything because it's an item_teamflag. When I tried that however, I constantly captured over and over with no round reset and even when the timer DID count down to 0 after all those captures, nothing happened.

I'm just not sure if I'm even using the right triggers at this point. :(
 

Fraz

Blu Hatte, Greyscale Backdrop.
aa
Dec 28, 2008
944
1,152
Check out Mangy's Koth_Aurora

I think that's basically the kind of setup you want, I'd ask him how he set it up, if I were you that is.
 

Undies

L1: Registered
Dec 24, 2009
45
9
It seems as though I need a func_capturezone to reset anything because it's an item_teamflag. When I tried that however, I constantly captured over and over with no round reset and even when the timer DID count down to 0 after all those captures, nothing happened.

I'm just not sure if I'm even using the right triggers at this point. :(

Ran into a similar issue one a map of my own were I just ended up halfassing it because I got tired of toying with entities. Just me perhaps, but I'd try and subvert the whole thing using a mess of entities. Add the KotH capture zone, put it somewhere inaccessible to players and then two logic_timers set for 180 seconds, one for red, one blu. Also two game_round_win entities, one each team :p
(not positive with entity inputs and outputs so forgive any syntax error)


On the Intel:
OnPickupTeam1 - CapZone - SetTeam - 1
OnPickupTeam2 - CapZone - SetTeam - 2
OnPickupTeam1 - RedTime - Enable
OnPickupTeam2 - BluTime - Enable
OnPickupTeam1 - BluTime - Disable
OnPickupTeam2 - RedTime - Disable

obviously when the timers end they ought to trigger the proper game_round_win ... just in case the KotH timers keep acting up, call it insurance

I don't think I'm missing anything, but I am very tired so anything is possible.
If that doesn't work then you should wait for a pro and not a cheeseball like myself.

EDIT:
Make sure you have ctf overtime turned off in the flag and/or the tf_gamerules entity.

You can reset everything with a func_respawnflag, which is not in the fgd by default (download ABS' pack of utilities)

or that ... which goes over my head
 

Promethium

L1: Registered
Jan 2, 2010
4
0
Make sure you have ctf overtime turned off in the flag and/or the tf_gamerules entity.

You can reset everything with a func_respawnflag, which is not in the fgd by default (download ABS' pack of utilities)

I do indeed have CTF overtime turned off (that was one of things I could fix about the non-round ending) but I'm not sure what you mean about resetting everything with the func_respawnflag. You'll have to bear with me and give me a little more detail as to what I'm missing / doing wrong. Sorry.

In the meantime I'll attempt Undies "mess of entities" solution and see how that goes.
 

Fenderic

L1: Registered
Dec 9, 2009
13
3
i'm putting together a template combining MangyCarface's and my own method,
if you just wait a little i will complete it and upload it so you can implement it into your map
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
You don't need a trigger_capture_area, team_control_point, func_capturezone, or logic_timer. You can access the KotH timers directly. They are standard team_round_timers named zz_red_koth_timer and zz_blue_koth_timer. You can Pause them and Resume them and even AddOutput OnFinished round_win_red:RoundWin.
 

Fantaboi

Gone and one day forgotten
aa
Mar 11, 2013
892
1,050
That gives plenty of time to have completed it! Or someone else to have made something similar...
 

DrLambda

L69: Teeheehee, Member
aa
Feb 18, 2015
458
475
So, i think i have an answer, although it is probably 6 years to late. Given that everything else except for the round win works (I haven't tested it and i'm not really interested in doing so,) you can add IO to the koth game timers, per example on map spawn or when the intelligence is first picked up. The koth timers are created upon compilation by the tf_logic_koth entity, so you will get "Bad I/O" errors if you do so, but it'll work. I described how to do it in my koth_leveled logic explanation. You can also see some work i did with it within my 3CP/KOTH Hybrid Prefab.

The short story is: Manipulating with the koth logic probably stops the round win from triggering, so you have to add outputs to the two entities zz_blue_koth_timer and zz_red_koth_timer that cause a gamewin to trigger. You can pretty much steal that logic from the 3CP/KOTH Hybrid prefab.

It looks like this: OnStartCap -> zz_blue_koth_timer -> AddOutput -> OnFinished win:RoundWin::0:-1 (OnlyOnce: Yes)
(Given that your game_round_win entity is called "win")