Problems with custom game mode.

Apr 19, 2009
4,460
1,722
So a friend of a friend is making a custom game mode that is a twist on 5CP. However, it has some game breaking logic problems and I was wondering if you guys could help figure this out.

wolfman101 said:
So I am making a TF2 map with 5 CPs, but it is different than normal push maps in that there is a different scoring system. To get to the point, after a team scores there is a 'kick-off' that spots the other team mid point so after a score instead of: [B B 0 R R] it is: [B B B R R].

I do this by telling the cp_master to not let either team win rounds and then using a logic relay that inputs SetOwner 2 or 3 to every control point and a force respawn to reset the players and then sending an input to game_rules to change the scoreboard accordingly.

The cap points are represented properly in the HUD right now, but in the above case there is a problem in that Blu players will be able to cap points 2-4 even though they already own 2 and 3 on the HUD.

So I guess my question is how do I have a trigger change the ownership of a cap point without screwing up the control point master?

a97923d6b2633c7c716ae8951700150fcad6412e.jpg


So, here is the reset relay for when red scores points. For example if red caps last then it gives red 7 points and triggers this logic relay. This looks good on the HUD, 3-4 will be locked blu, 2 will be blu, 1 will be red, and 0 will be locked red.

But, red will spawn like they own 2, blu will spawn like they don't own 2, and if blu players walk over caps 3 or 2 the game will act like they are capping it, including cap sounds, points, and triggering stuff that capping the point is supposed to trigger.

Oddly, the capture points will work perfectly fine for red team and the end caps always work fine as well.

I use TRIGGER for trigger brushes and use INVIS for cap areas. They can really be textured anything at all but there are only a few textures that render translucent in hammer.

If you switch the words 'red' and 'blu' in my example it still holds true.

And you can see the info-player-teamspawns in the screenshot. I am using the Associated CP value along with the Team value to control them like in a normal push map. There are no respawn rooms.

The screenshot is the entire map except for a cool in-map timer I made to represent a play clock.

I really can't explain wtf the game thinks is going on.

Link to .vmf and .bsp

Thread link
 

IrishTaxIDriver

L6: Sharp Member
Sep 27, 2008
271
149
As anyone can probably determine from the SA thread I'm the first friend.

Best I can figure is that its a bug, if you let the cap timer expire on the points they'll fix themselves. I ent_dumped the control points when they were messed up and I didn't see anything unusual.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
The supplied VMF appears to have a disparity in the logic mirroring.
• 0_blu_relay sends off three ownership outputs while 4_red_relay does not (they look like they should be mirrored?)
• Two CPs are linked to 1_team_relay and none are linked to 3_team_relay (the other three CPs and relays are linked 1:1)
• reset_red_score is fired from cap4's t_c_a by way of 4_red_relay as well as three timers. reset_blu_score is only fired by two timers.

Without actually digging into the logic, I can only assume some or all of this is related to the problems that are occurring.
 

IrishTaxIDriver

L6: Sharp Member
Sep 27, 2008
271
149
Yeah I noticed a few things like that when I was looking through it last night, but the problem occurs regardless of which team wins. The problem is centered on the middle three caps only: cap_1, cap_2 and cap_3.

If there is a logic problem, it'll be in the reset relays. It currently clears the ownerships, and then sets them to their appropriate values ([B B B R R] if red capped all, [B B R R R] if blue did). I tried changing his reset relays around and mirroring the timers and it was still happening.

Theres also the issue of how any of that would affect the time to cap lapsing fixing the points.
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Looking at it closer, and messing around with making the objective on my own, I guess Valve really did just break something. You mentioned a TC bug (which I hadn't heard of), and after realizing with my testing it was related to SetOwner I went and found this happening on the TC setup in my gametype library (which uses SetOwner for base-defended recaptures). Now, I messed around testing that setup so much when I made the library as I know it was complicated and had lots of places things could go wrong, and I don't remember ever encountering the "ghost capture" bug. I could have missed it since I wasn't aware of it at the time (if it did exist then), but I tested that thing so much...

One possible remedy, locking and unlocking the point after it begins to fake capture corrects the problem. So you could set up some relays that rapidly lock/unlock the point if the "wrong" team starts a cap. Lock/unlock won't work if done beforehand, though. So don't bother trying that one.
 

IrishTaxIDriver

L6: Sharp Member
Sep 27, 2008
271
149
The TC bug I mentioned is the Hydro uncapped point at the start of a round one. As far as I know its still unfixed and Valve has no idea how or why it happens. If its a bug in SetOwner it might explain it, and I'd have to guess its fairly new.

So you did encounter this ghost capture thing in your TC stuff?
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Well I'm not familiar with that one, but seems different. So that reinforces my thoughts that this SetOwner thing is some new bug that has been introduced. It also seems it happens no matter what when using SetOwner, even if there isn't a round change or a game_forcerespawn.
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
Why are your triggers pink.
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
/me learned something today
 

IrishTaxIDriver

L6: Sharp Member
Sep 27, 2008
271
149
Triple post, but:

Eric Smith said:
Ah, yes. I see the problem now. I have a fix for it on our end, but it won’t be out until the next TF2 update. We have an update going out today. It’ll be in the next update.

-Eric