Elevator Physics

Discussion in 'Mapping Questions & Discussion' started by gcone81, Jun 19, 2010.

  1. gcone81

    gcone81 L1: Registered

    Messages:
    37
    Positive Ratings:
    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.
     
  2. lana

    aa lana Currently On: ?????

    Messages:
    3,077
    Positive Ratings:
    1,389
    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.
     
  3. Nimelrian

    Nimelrian L2: Junior Member

    Messages:
    64
    Positive Ratings:
    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.
     
  4. Ezekel

    Ezekel L11: Posh Member

    Messages:
    818
    Positive Ratings:
    244
    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.
     
  5. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    You've not allowed to jump in L4D's elevators. I wonder why :O
     
  6. Tapp

    Tapp L10: Glamorous Member

    Messages:
    776
    Positive Ratings:
    215
    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.
     
  7. Smashman

    Smashman L3: Member

    Messages:
    118
    Positive Ratings:
    37
    Truly, just don't use elevators in TF2, that's one of the golden rules.
     
  8. Prestige

    aa Prestige im not gay anymore

    Messages:
    1,774
    Positive Ratings:
    1,654
    patched.
     
  9. Elec0

    Elec0 L1: Registered

    Messages:
    15
    Positive Ratings:
    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.
     
  10. gcone81

    gcone81 L1: Registered

    Messages:
    37
    Positive Ratings:
    3
    Thanks for all the responses so far. :)

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

    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.

    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?
     
  11. megawac

    megawac L4: Comfortable Member

    Messages:
    180
    Positive Ratings:
    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.
     
  12. gcone81

    gcone81 L1: Registered

    Messages:
    37
    Positive Ratings:
    3
    Ya, I've tried them before, but they almost seem a bit buggy. If all else fails though, I'll check them out again.
     
  13. Tapp

    Tapp L10: Glamorous Member

    Messages:
    776
    Positive Ratings:
    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.
     
  14. gcone81

    gcone81 L1: Registered

    Messages:
    37
    Positive Ratings:
    3
    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.
     
  15. Tapp

    Tapp L10: Glamorous Member

    Messages:
    776
    Positive Ratings:
    215
    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.