Assault map crashes on RoundWin.

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

Yatagan

L1: Registered
Sep 30, 2013
9
1
Hey Everyone,

New to the community, and Hammer/TF2 map creation, so my apologies if this is in the wrong spot.

Having vast experience with other level design and game development toolsets, I decided that it would be a great idea to learn Hammer and expand my experience base. As such, I'm making an attack/defend CP map in TF2; this site looked like the most active, so hopefully I can get help quickly!

I'm having a rather annoying issue. Whenever either team wins (I pass a 'RoundWin' to either Red or Blue's game_round_win entity, the game instantly closes. No errors, no nothing. Just *poof*, gone. Does anyone have any ideas as to what is causing this? I delayed the RoundWin output, and sure enough the crash happened at the end of the delay, so that's certainly the source of this weird crash.

Note: This happens when I test by hitting F9 to compile and play. Is that what's causing this? Would it not happen on a legitimate server?

Thanks for any help,
Yatagan
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Hard to say off hand, there are a handful of things in the game logic that can cause a crash. Do you have anything special going on at the victory? Are you doing anything related to the HUD (commonly can crash in payload maps)? Need more details, basically.

If you want to look at the details of what is going on you can use the console to enable developer 2 (verbose output, including entity IO) and then con_logfile <filename> to have it written out to the specified file in the tf\ folder so you can check it after the crash. You could also post the last few seconds (the entity IO are timestamped at the beginning of the line) here and I can take a peek.

Also, you basically are running a legitimate server. Launching through Hammer launches the game just the same, and playing locally actually functions as a local server that your client both runs and connects to.
 

Yatagan

L1: Registered
Sep 30, 2013
9
1
First of all, thanks for the info. Good to know it's not some weird 'test server' and everything should run fine.

My logic is very simple, I followed a few tutorials and figured things out using some info here: https://developer.valvesoftware.com/wiki/Team_Fortress_2_Level_Creation

It's a single round assault map, with 2 points; red defends them until time is up, blue tries to capture both, one after the other. Around either point I have a capture trigger, the first one simply outputs to add time to the round timer when blue caps, and then outputs to change the point so it's skinned as Blue team's.

The second point is the same thing, a trigger around the point. This one reskins the point to blue on capture, and sends a RoundWin output to my game_round_win entity for blue. As per the tutorial I followed, I have one game_round_win for each team (2 total), a team_round_timer controlling the rounds/timers/etc., a team_control_point_round so I can add more stages later once I get the hang of things, and a team_control_point_master.

I have very few outputs anywhere, right now I believe they are entirely on the capture trigger, so just the 4 mention above. (2 reskins, 1 roundwin, and 1 addtime)

Oh, and of course I have an output on the team_round_timer for when it runs out to pass a RoundWin to Red team's game_round_win. I tried both ways, capping all points as blue, and having time run out as red both make the game crash.

Would not having bots or any other players (just me alone) cause this by any chance? I'm going to double check my logic, then try getting that error log outputted like you said above.

Thanks so far guys! I'm very pleased to see fast responses, I was worried I'd have to wait for days and I'm working on this very quickly. :p
 

Yatagan

L1: Registered
Sep 30, 2013
9
1
K I ran the logging, a lot of unhandled inputs but I assume that's normal?

Here are the last few lines from the log:

(62.46) input capture_area_1: prop_cap_1.Skin(2)
(62.46) input capture_area_1: round_timer_1.AddTime(30)
(74.35) output: (trigger_capture_area,capture_area_2) -> (blue_win,RoundWin)()
(74.35) output: (trigger_capture_area,capture_area_2) -> (prop_cap_2,Skin)(2)
Blocking load of scene from 'scenes/Player/Scout/low/356.vcd'
(74.35) input capture_area_2: blue_win.RoundWin()

62 is where I captured the first point. Then I ran to the second, and at 74 captured it. I don't see anything majorly wrong going on here. That 'Blocking load of scene...' thing popped up every once in a while the entire time. (I was playing as scout)

Any ideas? :/
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
I'm not positive if it is the cause of the crash, but you don't need a game_round_win for Blue, their victory should be automatically handled by the team_control_point_master seeing that they own all CPs.
 

Yatagan

L1: Registered
Sep 30, 2013
9
1
I was wondering about that. I couldn't find it in any of the vanilla maps. I did try without it and still crashed, so it isn't the source, but I'll remove it (and the relevant output) non-the-less.
 

Yatagan

L1: Registered
Sep 30, 2013
9
1
Well I guess my setup is totally botched... The tutorials I followed appear to be very wrong in a lot of critical areas.

I removed the game_round_win for blue team (And the related output from the last CP). The result: I played as blue, capped both points but did not win. Nothing happened, the timer continued. When the timer hit 0, it sent the RoundWin function with a 5 second delay (left over from earlier attempts to fix the crash) then after 5 seconds when Red should have won, the game crashed.

It's when the 'RoundWin' inputs that the game crashes. Any settings on the entities I should know about? I'm going to start tweaking things... "Force Reset", etc.

And why didn't blue win? As you said, shouldn't it be automatic once all points belong to them? And no, I do not have anything set to restrict a team from winning. (Set to 'Neither')

Here's the end of the log:

Yatagan captured Interior for team #3
(97.21) output: (team_round_timer,round_timer_1) -> (end_of_game,RoundWin,5.0)()
(102.22) input round_timer_1: end_of_game.RoundWin()

EDIT: I disabled some settings like 'force reset' and 'swap teams at end of round' and it changed the crash from an instant close, to a freeze. I have to minimize and end the program. So, not sure if that's related?
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
If you have the TCPM set to neither, then technically red should be winning as soon as the round starts since they own both. (Normally you restrict red on an AD map)

Are your two CPs in the same "group index"? Are they both named in "control points for this round" on the TCPR?
 

Yatagan

L1: Registered
Sep 30, 2013
9
1
I thought that was weird as well, red is not winning instantly. I tried setting red to the restricted from winning team, but then things got weird. My first control point stopped working, it didn't show up in the HUD and couldn't be captured.

The group index for both points is 0, though it says "(not using control point rounds)." which I am, which would make me thing this doesn't matter? For the 'control points for this round' I have them both, "control_point_1, control_point_2"

They both show up in the HUD, they display the right color, the second one is properly locked until the first is captured. It all works just fine except neither team wins automatically (Blue doesn't, in this case, nor RED as they are not restricted), and sending a RoundWin output crashes the game.
 

Yatagan

L1: Registered
Sep 30, 2013
9
1
Do you actually have a comma in that key? The names are supposed to be space delimited.

There indeed was (Tutorial I read said separated by a comma and space...). I removed it, and it made absolutely no difference. Game functioned exactly the same (Blue didn't win) and still the freeze at the end. :(
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Hmm. I don't know what else to suggest short of you typing out all the relevant logic entities or tossing me the VMF in a PM. It might be something you'd overlook but I could notice if I was looking at it and wouldn't otherwise think about. /shrug

You could also try simplifying it by removing the TCPR. It should work for a single round map, but it is entirely unnecessary and would narrow things down... not that we know what we are looking for anyway.
 

Yatagan

L1: Registered
Sep 30, 2013
9
1
I'll take you up on that. I'll send you a PM now! Hopefully you can spot something as I'm almost entirely certain I'm just overlooking something silly.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
The only thing I notice is your red spawn point is in the floor and both spawns should have their "spawn for round" keys set when using a TCPR. I'm not aware of this being able to cause a crash though. TF2 isn't up to date or I'd have a poke at it ingame.
 

Yatagan

L1: Registered
Sep 30, 2013
9
1
I hadn't completed the spawn rooms yet, so I've done that, adding the trigger and setting the 'spawn for round' options.

I messed with some other settings, just tweaking things...

It no longer crashes! I completed a round both by capping all as blue, and waiting it out as red. I haven't a clue what the exact cause was, but I think it may have had something to do with the spawns... Thanks for pointing that out! I can resume work guilt free. Thank you very much for all the help! (I'll probably be back with more questions... xD)

Best,
Yatagan