Strange Behaviour on Map Reload

Avatar
Sidneys1
89 Posts
Posted May 13, 2011
So, today I opened up Hammer to add an elevator to the beginning of my map, and all goes well until suddenly, without warning, none of the triggers in my map work when I run it in P2..

So I restart hammer and p2, recompile, and try again.. All the triggers work. Make a minor change, recompile, reload the map, and the triggers don't work again.

Then I restarted P2, but not hammer, and loaded the map. Triggers worked. Reloaded the map, and the triggers didn't work.

I'm thinking something in my map is 'breaking' the event system, but only after I've already (succesfully) loaded and run my map once. I looked around on the forums, but I didn't see anything that helped.. Any ideas?

Have a nice day,
~Sidneys1

Advertisement
Registered users don’t see ads! Register now!
Avatar
MrTwoVideoCards
584 Posts
Posted May 13, 2011
Replied 13 minutes later
Hmm, thats odd. Are you reloading the map by mapname when you reload it, or are you just killing yourself to reload the map?

It sounds like whatever you're doing inside of Portal 2 is reloading the map without loading the newest entity lump.

Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 12 minutes later
I'm using the console command "map through_the_roof".
Avatar
CraigChrist
41 Posts
Posted May 13, 2011
Replied 3 hours later
What type of triggers don't work? Buttons, trigger_multiples or maybe just trigger_once (or any other that triggers only once)? I heard of similar issues when a map reloads but it looks just like you respawned, and all triggers that were triggered the first time don't reset.

Is that the case? or the second time the map resets but triggers just don't work?

In any case I would track back and check all the stuff that were added since the last time it worked right. Hide it one by one until you find what caused the problem.

Give some more info if you can.

Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 18 minutes later
It may be just trigger_once brushes.. I spawn in the elevator car, and it never decends. If I noclip out of it, the door to my chamber (automatically opened by a trigger_once) doesn't open. I'll see if I can test a trigger_multiple and see if it's just the trigger_once brushes.

Thanks for the suggestions though.. I think it started when I dropped a certain instance into the map, but I took it back out and the problem persisted =P

Have a nice day,
~Sidneys1

Avatar
msleeper
4,136 Posts
Admin
Posted May 13, 2011
Replied 6 minutes later
This is incredibly weird. Can you try using the "disconnect" command (so that you are dropped from the game) before reloading your map?
Avatar
CraigChrist
41 Posts
Posted May 13, 2011
Replied 27 minutes later
Have you tried some other map? maybe it's a problem with a game (i doubt it though).

Have you tried a map anywhere else beside you computer? to see if the problem is somewhere in your system...

just listing suggestions, so we can discard some things and locate what's causing the problem.

can't think of anything else right now

Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 32 minutes later
Ok, I did some testing, and narrowed things down a little:

It now appears to only be the trigger in the Instance containing the arrival elevator that starts the elevator on its downward path. It breaks on both "map [mapname]" and "disconnect" then relaunching the map.

However, this trigger does work in msleeper's map (good enough for science), regardless of how many times I restart it. This confuses me, since both his map and mine use the same vmf file for the Instance.

Urgg, this makes rapid prototyping so much less rapid.

Thanks for the help,
~Sidneys1

Avatar
msleeper
4,136 Posts
Admin
Posted May 13, 2011
Replied 6 minutes later
Sidney, try verifying the game cache for the Portal 2 SDK files. Maybe your got corrupted some how. Are you using any custom compile options? Are you using "Export" or "Normal" compile mode, and does changing to the other have any effect?
Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 18 minutes later
Just did.. Hadn't even thought of that. Says two files failed to check out and were reaquired.. I'll launch it in a minute or two to see if it worked.
Avatar
msleeper
4,136 Posts
Admin
Posted May 13, 2011
Replied 4 minutes later
I'm gonna bet money that you accidentally altered and saved the instance and some how caused this. I know I accidentally overwrote a couple of instances just messing with them myself.
Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 11 minutes later
That may be the case, I did go through most of the Instances to see how they work.. However, I remember being pretty sure to click "don't save" if I accidentally moved/changed something.. But who knows. It'll be a while before I can get to the sdk to check though, busy with other stuff at the moment...
Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 4 hours later
Gah, ok, so I checked cache integrity (which reset my extras menu file.. ugh) and recompiled. Annnd: problem persists.

I'm going to upload my bsp, see if anyone else gets the problem as well.. If so, then I'll also upload the vmf, see if anyone can find what's wrong..

through_the_roof.bsp

Keep in mind that this is a very unfinished map.. Only has two chambers. =P I'm thinking of instancing the third, as it'll be pretty big.

Thanks for helping out,
~Sidneys1

Attachments
through_the_roof.bsp
1.92 MB 41 downloads
Avatar
CraigChrist
41 Posts
Posted May 13, 2011
Replied 20 minutes later
Just tried it about 4 times. Everything worked fine each time. First i finished it, then it restarted, worked fine, so I got to the bridge again, then started it again through the console, and finished one more time and it restarted and once again everything worked fine...

It's definitely something on your side. Try rebuilding the cache for the game...

I got no more ideas right now, really strange

Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 9 minutes later
Hmm, ok.. I'll try verifying the entire Portal 2 cache, see if that turns up anything.

Have a nice day,
~Sidneys1

Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 56 minutes later
Yup, that was it.. verified the Portal 2 cache and that was corrupt.. The resulting patches were 17ish megs, so a pretty substantial file was corrupt. Wonder what it was.. Is there any way of finding out?

Have a nice day,
~Sidneys1

Avatar
msleeper
4,136 Posts
Admin
Posted May 13, 2011
Replied 2 minutes later
I doubt it but I don't know for sure. I'm guessing a DLL, but that's just a guess. Makes me wonder what else could have been broken for you.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Sidneys1
89 Posts
Posted May 13, 2011
Replied 12 minutes later
I'm thinking that it must've had something to do with the order in which the player and triggers/events are initalized.. Something like the player spawning withing the trigger before the trigger could fire its events, thus preventing the elevator from continuing down the shaft. Who knows.. I'd report it to the mailing list, but it isn't really Valve's fault since it was a cache integrity issue, not a real 'bug'.

Have a nice day,
~Sidneys1