Help me with multi stage arena

  • If you're asking a question make sure to set the thread type to be a question!

tyler

aa
Sep 11, 2013
5,102
4,621
As the title says, I'm trying to create a multi-stage arena system. I'm stuck.

I'd like it to effectively function like Dustbowl or Gold Rush, except it doesn't matter who wins--you always go to stage 2 and stage 3 and then just start over. I've tried just plugging the arena CPs into TCP_rounds, but it doesn't work and I don't know what TF2 wants from me to make it work.

I looked at Tachyon (sorry Void) to see if I could figure out what he and Doom did, but it was completely lost on me and also I think a lot of it is KOTH-specific.

Don't ask me why or tell me it's a bad idea, it's not a serious map.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Not sure what part isn't working, so...
•Did you give the rounds different priority values (in descending order)?
•You should only need one tf_logic_arena, not one per round.
•If it is always playing the first one, it might be resetting the point causing the round to be considered up for grabs. This would need some run-time priority editing done.

It's been many years since I looked into how TC arena would work for zpqrei (and a year since I did Tachyon's logic), so I'm not positive of what is/isn't needed for a linear multi-stage arena. Though I'm sure it can be done.
 

tyler

aa
Sep 11, 2013
5,102
4,621
The rounds have separate priority values (for this I looked at your multistage prefab). Round one is 3, 2 is 2, 3 is 1. There is one tf_logic_arena. The spawns per round are linked to the control point per round.

Oh. Maybe what I need to do is send an output like... when all the blu guys are dead, red owns the point? Then it'd consider the round won?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
That might work, if the problem is that winning by kills doesn't change ownership of the point (I've never paid attention to it...). You should be able to use the TCPR OnWonBy outputs to set ownership, maybe.

Otherwise, you could override priority by using AddOutput to change the cpr_priority key. The best way to do that would be to change it at the beginning of a round, and use that round's OnStart output.

OnStart|!self|AddOutput|cpr_priority 0

Put that on round 1 and 2, which will drop them below the priority of the next round.

If the point do not actually get/stay captured, you may have to force them to be owned anyway.
 

tyler

aa
Sep 11, 2013
5,102
4,621
So if I have 3 stages of that, will I need to be changing their priorities constantly in order for the stages to properly cycle? Because once they are all 0, I can see a crash happening.

How does a tcpm know when BLU wins, anyway, is it checking for ownership of all points? Will rounds reset on stage 3 being won regardless of the team that wins the final round?
 
Last edited by a moderator:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
If set up properly, after all three are used someone will be a match-winner and the map will reset, so you won't have to "fix" the priorities. (all 0 wouldn't crash either, same-priority is random, ala TC)

tcpMaster is checking for ALL points being owned, yes. tcpRound checks for ownership of all within itself. The reset will only occur after 3 is the winning team also owns the other two points.
 

tyler

aa
Sep 11, 2013
5,102
4,621
Hm... it was sort of working and sort of not working with your AddOutput method... I think part of the issue is that using !self was targeting every tcpr instead of just itself so I've named them and made it more specific. Still need to see if it works after that--the team does take control of the point by killing the entire enemy team but I don't remember if I was doing that after the point unlocked or not. You're a dreamboat, Booj.
 

tyler

aa
Sep 11, 2013
5,102
4,621
It doesn't seem to function either way.

What I'm getting is cp_a and cp_c don't exist (according to the ent_fire command, at least) and the only point that ever enables is cp_b. But since I'm always on the round with cp_a, it doesn't matter who wins or how, the stages never progress.

One time I ended up at stage 2 and then stage 3, but I have no idea how I did it.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
...don't exist? You didn't accidentally give them all the same index did you?

Kinda running out of ideas and I'd like to poke around in Hammer, but I haven't got the time for that now/today.
 

tyler

aa
Sep 11, 2013
5,102
4,621
...That is exactly what I did. We can call it an accident, sure.

Now it works so long as cp_a is captured, then rounds 2 and 3 function fine--I'm not sure why. Rounds 2 and 3 also start with the hologram enabled, maybe that has something to do with it?
 

tyler

aa
Sep 11, 2013
5,102
4,621
I changed it so that when round 1 is completed, the tcpr sends an output to CP_A to set the owner that way, but it didn't work I guess because tcpr relies on the owner being set to complete the round at all. I am going to use my trigger_multiple idea after all.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
CP ownership cannot be changed in through any method between the time the round is over, until 5 seconds after the next round begins (when you can walk). Normally I can work around this by using hidden CPs to "hold the round open" for a fraction of a second to do things before forcing a win, but since arena just ends when everyone dies that wouldn't help much.
 

tyler

aa
Sep 11, 2013
5,102
4,621
Hm, that explains why it isn't working. Good to know I wasn't doing something wrong. Any suggestions? I'm out of ideas again.

Is it possible to start a game on a random round? Or anything?

If I do TC Arena (which you say should work) will it have the annoying map before the round starts?
 
Last edited by a moderator:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
I'm pretty sure the map only shows if you have the definition for one (resources/roundinfo/mapname.res) so that shouldn't be a problem. Starting on a random round should occur naturally if all the rounds are equal priority.
 

tyler

aa
Sep 11, 2013
5,102
4,621
I'm giving up for today. Maybe I can figure this out tomorrow.

With 3 equal priority rounds, the map starts on a random stage and continues into random stages fine when all enemy players are killed.

But on round B, the point never unlocks. The hologram will appear and the announcer says it is unlocked but it isn't. It's only happening with B after about 10 rounds in each stage, no idea what is wrong, no idea what to do.