Thread: Pressure pad

Results 1 to 8 of 8
  1. #1
    Is not hoers Streamfox's Avatar
    Join Date
    Apr 2009
    Location
    Zandronum
    Posts
    760

    Post Pressure pad

    I thought I copy paste my post into this tutorial section to preserve it for future usage, if someone ever wanna have some pressure pad.
    This entsystem lets you have a "pressure pad" which toggles a light ON and OFF, depends on if a player is standing on the pad.
    If player is standing on it light goes ON and pad goes down, if leaves light goes OFF and pad goes up.

    Put a func_door on the ground:
    Code:
    name: pressure_light_door
    obey trigger mode:  yes, even when moving
    yaw: down
    lip: 2
    flags:
    [x] toggle
    Then put some slim(2-8 units tall) trigger_multiple on the door:
    Code:
    target: pressure_cvalue
    flags:
    [x] fire on enter
    [x] fire on exit
    The dark brush is the pad, and null textured brush is the trigger_multiple:


    Create a trigger_changevalue:
    Code:
    name: pressure_cvalue
    destination entity: pressure_target
    destiantion key: $i_num
    source value: 1
    action: XOR
    You'll need an info_target, turn off smart edit and add a new keyvalue:
    Code:
    name: pressure_target
    $i_num: 0
    Next add some trigger_condition:
    Code:
    monitored entity: pressure_target
    monitored key: $i_num
    compare-value (alternative): 1
    comparator: == (equal)
    target for 'true'-case: pressure_relay_on
    target for 'false'-case:  pressure_relay_off
    Now two trigger_relays:
    Code:
    name: pressure_relay_on
    target: pressure_light_door
    trigger state: on
    Code:
    name: pressure_relay_off
    target: pressure_light_door
    trigger state: off
    Add some light:
    Code:
    light: pressure_light_door 
    flags:
    [x] initially dark
    The light and door entity share the name: pressure_light_door, so both being toggled respectively when player stepping on the pad.
    You can replace the light with something else, like a door, which only stays open as long as a player is on the button.
    Or set the trigger_multiple's flags to "no client" and "pushables", so it only activates when you put a heavy crate on it or something.

  2. #2
    monster_robogrunt Zorbos's Avatar
    Join Date
    May 2015
    Location
    Hammer
    Posts
    115

    Re: Pressure pad

    Clever usage of entities. Nice work!

  3. #3
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,583

    Re: Pressure pad

    Nice build. I'm not convinced you'd need a door for this, or that many entities though.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  4. #4
    Donated 15NS$ for Sven's Holiday at the Bahamas Puchi's Avatar  
    Artist
    Join Date
    Nov 2002
    Location
    Akihabara, Bochum or Sailune
    Posts
    5,617

    Re: Pressure pad

    I am not sure there.
    You could use a func_button like Hezus suggested, which would be my first idea aswell, but you cannot easily control when the func_button moves back to the upper position.
    Without recreating this and only looking at the setup, to switch something on/off this should be the most simple system.
    Do it with passion, or not at all.
    Do not say everything you know. Know everything you say.
    [ MarySP ][ nacl-h2o ][ The next SC Version ♥♥♥♥ing pwns! ][Puchis Maps ]

  5. #5
    Administrator Hezus's Avatar  
    Manager
    Join Date
    Aug 2001
    Location
    The Netherlands
    Posts
    9,048

    Re: Pressure pad

    As Puchi mentions: seems like a pretty complex setup. Here's is the most simple setup I could come up with.

    1. Create a pressure plate and turn it into a func_door. Angle to 'down', speed to 20 and name it 'pressure_plate'. Set the lip to '2' and tag Flags 'Toggle'.

    2. Create a trigger_multiple above that plate (same size, small height). Set the target to 'pressure_*'. Use Flag 'Fire on Enter'.

    3. Copy the trigger_multiple you just made and change the flag to 'Fire on Exit'. Put it slightly above the other trigger_multiple.

    4. Put a light / door / whatever you want to trigger and call it 'pressure_something'. (the * wildcard will search for anything starting with 'pressure_').

    Streamfox' way would use some more entities but accomplishes the same. Use whichever you like.. no pressure
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	pressure.png 
Views:	59 
Size:	707.1 KB 
ID:	17423  

  6. #6
    Is not hoers Streamfox's Avatar
    Join Date
    Apr 2009
    Location
    Zandronum
    Posts
    760

    Re: Pressure pad

    Quote Originally Posted by AdamR View Post
    Nice build. I'm not convinced you'd need a door for this, or that many entities though.
    The door on the ground is the cosmetic effect imitating the pressure pad.

    Quote Originally Posted by Hezus View Post
    As Puchi mentions: seems like a pretty complex setup. Here's is the most simple setup I could come up with.
    And I just broke it, by walking all over the "pressure_plate" until they stuck in the open position:



    Before you say, I tested with others my system this way and couldn't break it in any way.

  7. #7
    Administrator Hezus's Avatar  
    Manager
    Join Date
    Aug 2001
    Location
    The Netherlands
    Posts
    9,048

    Re: Pressure pad

    Could you explain how you broke it exactly? I've walked all over the pressure plate 10 times and it worked. What do you refer to when you say 'they'? There's only 1 plate, right?

  8. #8
    Is not hoers Streamfox's Avatar
    Join Date
    Apr 2009
    Location
    Zandronum
    Posts
    760

    Re: Pressure pad

    Yes there's one plate and the test door on the wall sharing same targetname. 'They' refers to plate on the ground and blue brush door on the wall.
    About breaking it. I just like was constantly and quickly walking back and forth on the plate, until both the plate on the ground and test door got "stuck" in the open/pressed down position.
    Kind of like reversing the effect, plate goes up and door goes down, when standing on the plate.

    Maybe not that easy to break but there's the chance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •