# Multi-point KOTH entity setup!

#### Zhan

##### L5: Dapper Member
Hey everyone,

I've succeeded in creating a working entity setup for a two-point KOTH map! The mechanics were suggested elsewhere on these forums (don't know by whom), but are as follows:

1. Two control points are unlocked at the beginning of each round
2. Holding one of the points while the other is neutral runs your team's timer down like normal
3. If both of the teams hold one point each, both timers run down at normal speed simultaneously
4. When one team hold both points, that team's timer runs down at twice the normal speed

As far as I know, nobody has made a map with similar mechanics, so I don't know how well an actual map would play. But, you can download the .vmf and play around with it yourself, and if you feel so inclined, make a map with the gametype: http://dl.dropbox.com/u/18787920/tf/koth_doublepoint_logic.vmf

A bit about the entity setup:

In addition to the normal koth entities and an extra team_control_point, I'm also using four logic_branches, a math_counter, two logic_timers, and a logic_case that sends outputs to zz_red_koth_timer and zz_blue_koth_timer, two hidden team_round_timers created at compiletime by the tf_logic_koth. Each control point "contributes" a number to the math_counter, so that the counter is always the sum of a number from control point A (1 if held by BLU, 0 if neutral, -1 if RED) and a number from control point B (3 if held by BLU, 0 if neutral, -3 if RED). The consequence of this is that for each of the nine unique combinations of control point ownership, the math_counter gets set to a unique integer from-4 and 4, which in turn sends the value to a logic_case that pauses and resumes the timers.

Haven't done a great deal of testing, so most likely some things are still buggy. I don't think overtime works correctly yet, and the announcer has a tendency to voicespam while a timer is going down at double speed.

Last edited:

#### 8bitprodigy

##### L1: Registered
Funny, just today while working on my own KOTH map, I was wondering if this was possible. Small world! (Also, nice work )

#### Zhan

##### L5: Dapper Member
Thanks, I know in the earlier thread it was mentioned several more experienced mappers said it was *possible*, but I hadn't seen it done elsewhere.

This was also a great learning exercise in dealing with Source entities, so now I feel a bit more comfortable dealing with timers and conditional logic entities, etc.

#### Empyre

##### L6: Sharp Member
Very interesting! Could this be extended to more than 2 points? I think a 3-point version of this could play like the classic domination mode from the original Unreal Tournament, except counting down instead of up.

#### Zhan

##### L5: Dapper Member
As far as I can tell, three points would be doable, but would complicate the entity setup quite a bit. In addition to the logic_branches that move the sum math_counter ±1 and ±3, you'd need another one that's ±9 so that you'd get 27 unique values in the math_counter... of course then you'd need to have an additional logic_case (which can only handle 16 cases) to accommodate the extras.

Probably wouldn't be too difficult to modify what I've got here, though, if you're interested in working it out yourself.

Oh YES.

#### Luigi Thirty

##### L2: Junior Member
Very interesting! Could this be extended to more than 2 points? I think a 3-point version of this could play like the classic domination mode from the original Unreal Tournament, except counting down instead of up.

I have a skeleton map that implements the double domination game mode. Couldn't get a layout to work though. I can toss the VMF up somewhere if you want to play with it.

#### LeSwordfish

##### semi-trained quasi-professional
aa
I don't think overtime works correctly yet, and the announcer has a tendency to voicespam while a timer is going down at double speed.

Not a bug, a feature.

And overtime is pretty questionable in this, since a wave assault on the point to keep it 1% capped while your timer dribbles down would be a cheeky bastard effective tactic.

#### ardysqrrl

##### L4: Comfortable Member
this is a bad game mode you should feel bad

#### TomHD

##### L1: Registered
Another overtime thing: If team red has two points and five seconds left on the clock. Team blu then manages to secure one point in overtime, does the game then end in red victory because blu didnt get someone on the other point to keep overtime going?

#### Zhan

##### L5: Dapper Member
Tom, ideally that's what would happen. Currently, the overtime behavior is really screwy, and I'm going to try and work out the bugs soon.

We had a couple of moments in the testing of koth_doublepoint today where one team should have one when the their timer reached zero, but that was postponed because of overtime, and when overtime ended (points stopped being capped for whatever reason) it still didn't register a win. I think what I'll try to do is as soon as one of the round timers has reached zero, trigger game win over and over again so it'll still try to do it even when overtime finishes.

download broke

#### Mikroscopic

aa
Heh, I read the title and thought it said Multi-Stage KOTH. I guess I'll have to keep trying to figure that out on my own.

Interesting custom gamemode though. I like to see people being creative with the entity system.