The mysteries of Valve:

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

xzzy

aa
Jan 30, 2010
815
531
Trying to get both stickies and engineer buildings to work properly on dynamic map elements. If someone can explain this to me, I'd love to hear it. My phases were:

a) func_brush - engineer works, stickies don't. I knew this going in.
b) func_brush -> prop_dynamic with vphysics. Stickies work, engineer can't build. Makes no sense to me, I waste hours trying different configurations.
c) func_brush -> prop_dynamic -> player clip. Stickies and buildings suddenly work.

Each "layer" is separated by 1 hammer unit.

Is there special code in the game that only allows engineers to build on props if there's a matching player clip?
 

tyler

aa
Sep 11, 2013
5,102
4,621
It doesn't matter if you func_detail it or not, it still also acts as a playerclip either way.
 

xzzy

aa
Jan 30, 2010
815
531
func_detail isn't an option in this particular case because I need to be able to name the entity and kill it later.

But I'll try it anyways.. it never occurred to me to try block bullets and it might be a cleaner solution. I'll just tie them to a func_brush instead of detail.


Even though it still makes no sense to me why placing a player clip allowed the engineer to build his buildings. :D
 

xzzy

aa
Jan 30, 2010
815
531
Players can walk just fine on vphysics models. That's why mappers almost always disable vphysics on light fixtures.. to prevent people from standing on them.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
My guess is that being able to build on top of playerclip brushes was done so you can still build on stairs.
 

xzzy

aa
Jan 30, 2010
815
531
Yeah, when we finish stoneyridge I might go back and do some tests to really figure out what's going on, but at this point I'm at a "phew I got it to work, let's move on to the next problem" stage.

I wonder if Valve even knows why some of the quirks in their games work the way they do.
 

Trotim

aa
Jul 14, 2009
1,195
1,045
Yeah, when we finish stoneyridge I might go back and do some tests to really figure out what's going on, but at this point I'm at a "phew I got it to work, let's move on to the next problem" stage.

I wonder if Valve even knows why some of the quirks in their games work the way they do.

They as a collective likely really don't. Like how Gravelpit and 2fort have rotating things that work in Garry's Mod but not in TF2 at all because func_rotating is broken
 

xzzy

aa
Jan 30, 2010
815
531
Well, I'm back at square one.. Crash found a crazy problem where my solution that allows stickies and engineer buildings: if you try to use a teleporter where the exit is on the dynamic element, the exit blows up.

I made a demo vmf:

http://xzzy.org/files/games/tf2/sticky_test.vmf

It has 5 configurations of dynamic elements, using various configurations of func_brush and prop_dynamic. I've labelled 1 - 5. You get something like this:

Gate 1: Build OK, Teleport OK, Stickies FAIL
Gate 2: Build FAIL, Stickies OK
Gate 3: Build OK, Teleport FAIL, Stickies OK
Gate 4: Build OK, Teleport OK, Stickies FAIL
Gate 5: Build OK, Teleport FAIL, Stickies FAIL

So basically, I can't find any combination that will allow me to do all three of:

a) Build engineer buildings,
b) Use teleporters,
c) Stickies stick.

Does anyone have any other ideas to try?
 

tyler

aa
Sep 11, 2013
5,102
4,621
What is the situation? Are all of these absolutely necessary? Will engineers realistically build a teleporter in this spot?
 

xzzy

aa
Jan 30, 2010
815
531
It's not a place a good engineer will build a teleporter, but it is a popular sentry nest so it's reasonable to assume that a teleporter will be built there someday, and I'm not a huge fan of breaking gameplay elements without some kind of explanation for it to be that way.

I took another look at what Valve did on the last point of goldrush, and it appears they were content with stickies not functioning where the bomb cart detonates.. because that's what happens. As stoneyridge is a CP map, stickies not working is a really bad option.

If there's no way to cleanly kill off playable geometry in TF2 and have all the class mechanics work properly, I think my plan will be to just make blockbullets into func_details.. I have confirmed that this works properly for all class abilities. The downside is I can't remove the brushes later, but I think I can conceal this flaw by using a trigger_hurt to get rid of any players in the area.. the geometry only disappears as part of the finale so this doesn't hurt actual play.
 

tyler

aa
Sep 11, 2013
5,102
4,621
servers with dumb mods will have invincible donators above the pit after the round ends saying "WTF" into the chat box
 

xzzy

aa
Jan 30, 2010
815
531
servers with dumb mods will have invincible donators above the pit after the round ends saying "WTF" into the chat box

trigger_push, straight at the moon. I'll build a skybox tunnel for it if I have to.


I say we all mail sticky_test.vmf to Valve and beg them to fix it.
 

xzzy

aa
Jan 30, 2010
815
531
Another fun quirk: it looks like if a teleporter exit is inside the bounding box of a prop_dynamic, the exit destroys itself on use as well. This has the smell of some kind of exploit prevention on Valve's part.. it's probably a pretty rare case for models to have bounding boxes larger than the model itself. I kind of used it as a hack in stoneyridge to help line up imported models with brush work.

Someday if I get bored I might test if it's the same for other prop types, but for now I got more pressing tasks to clean up.