Elevator Physics

gcone81

L1: Registered
Nov 27, 2009
37
3
I'm sure you've all seen multiple elevator threads on these forums, but please bear with me.

I am using 'elevators' in my map, Chamber. In reality though, they're really just simple lifts made out of func_doors that move up and down. Their purpose is to bring one player down into an area where another player will duel with them. Unfortunately, additional players can accidentally or inadvertently get on the lifts and, as you all know, the elevators become jerky and will suddenly stop and start.

According to the page on elevators at the Valve Developer Community website, this is the cause of "the network player physics designed to save on resources". Specifically, what does this mean? Where is this defined in the code of the Source engine? Would there be any way to 'modify' the physics to prevent this from happening? I'd be very interested in knowing exactly what causes this phenomena to occur.

If, however, there is absolutely nothing that can be done, are there any techniques that would at least minimize the frequency of the lifts malfunctioning?

I would replace them if I could, but the lifts allow for a specific chain of outputs and inputs that I cannot do without.

Any help is appreciated.
 

lana

Currently On: ?????
aa
Sep 28, 2009
3,075
2,778
I'm sorry but as far as we know the physics is directly related to optimization in the code. Unless you're in a payload map, there's no way to modify it so it works properly. To stop other players from getting in, well, it'd depend on what you're doing now.
 

Nimelrian

L2: Junior Member
Jun 13, 2010
64
6
Well, why do you not use a door for each team, which are forced to close when one of the team-members enters the arena?

Blu Player in arena: Blu door closes until player dies.

Red Player in arena: Red door closes until player dies.

By using this, you could forget about the elevators.
 

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
thing is though, L4D shows that source CAN handle elevators in a multiplay environment.
though it IS a different iteration of source so that might not be valid. however, one thing that i've noticed for L4D2 elevators is that they're slow moving.

what i would suggest is using func_spawn_visualiser <-- this thing is solid to one team and passible by the other. very useful for keeping people out of places they don't belong.
 
Mar 23, 2010
1,872
1,696
Also, if you throw a propane tank or something at someone in an elevator (I think it's only in l4d1, idk) they fall through the floor.

patched.
 

Elec0

L1: Registered
Jun 19, 2010
15
3
Try trigger_pushes instead of elevators. They tend to work fairly well, and you can disable one and enable another or change the direction or whatever.
 

gcone81

L1: Registered
Nov 27, 2009
37
3
Thanks for all the responses so far. :)

I'm sorry but as far as we know the physics is directly related to optimization in the code. Unless you're in a payload map, there's no way to modify it so it works properly. To stop other players from getting in, well, it'd depend on what you're doing now.

Darn, that's too bad. I suppose I'll just have to find some sort of work-around.

Well, why do you not use a door for each team, which are forced to close when one of the team-members enters the arena?

Blu Player in arena: Blu door closes until player dies.

Red Player in arena: Red door closes until player dies.

By using this, you could forget about the elevators.

The only problem with that is the players actually drop down into a pit before they're allowed into the arena. If two players time it correctly, they can both jump in before the door above fully closes. Even if I made the door move faster, there would still be a possibility that another player could make it in or at least get caught in the door itself. I'll try experimenting though and see what I can come up with.

Try trigger_pushes instead of elevators. They tend to work fairly well, and you can disable one and enable another or change the direction or whatever.

Thanks, I'll have to try that. But does the player have to jump to be affected by the trigger_push or can it lift them off of surfaces by itself?
 

megawac

L4: Comfortable Member
Oct 2, 2009
180
29
I suggest using a teleporter... I know its not realistic but I think it would be better for your implication.

If you make the teleporter just add a toggle output to itself when its triggered.
 

gcone81

L1: Registered
Nov 27, 2009
37
3
I suggest using a teleporter... I know its not realistic but I think it would be better for your implication.

If you make the teleporter just add a toggle output to itself when its triggered.

Ya, I've tried them before, but they almost seem a bit buggy. If all else fails though, I'll check them out again.
 

Tapp

L10: Glamorous Member
Jan 26, 2009
776
215
I managed to make a (semi) working lift by parenting some func_brushes with solid_bsp set to yes. To fix players blocking it, I parented a trigger_hurt brush to the same object, and made it slightly smaller than the func_brush. If the func_brush gets stopped, the trigger_hurt overtakes it, killing whoever stopped it.
 

gcone81

L1: Registered
Nov 27, 2009
37
3
I managed to make a (semi) working lift by parenting some func_brushes with solid_bsp set to yes. To fix players blocking it, I parented a trigger_hurt brush to the same object, and made it slightly smaller than the func_brush. If the func_brush gets stopped, the trigger_hurt overtakes it, killing whoever stopped it.

The only problem is that I don't want to hurt the player. In the past though, I have made similar lifts but with a trigger_push instead of the trigger_hurt. Unfortunately, it didn't seem to prevent the player from stopping it. I suppose I could try using a teleporter brush inside the lift, but I don't think that would look very good with players suddenly disappearing.
 

Tapp

L10: Glamorous Member
Jan 26, 2009
776
215
The only problem is that I don't want to hurt the player. In the past though, I have made similar lifts but with a trigger_push instead of the trigger_hurt. Unfortunately, it didn't seem to prevent the player from stopping it. I suppose I could try using a teleporter brush inside the lift, but I don't think that would look very good with players suddenly disappearing.

If the player is blocking the elevator, how do you remove them from it without killing them? It seems the most logical coarse of events is that you would get squished. If you really didn't want to kill them, I guess you could use a trigger_teleport.