how to make a door with a button

Discussion in 'Mapping Questions & Discussion' started by Corfix, Oct 17, 2016.

  1. Corfix

    Corfix L1: Registered

    Messages:
    29
    Positive Ratings:
    0
    how do i make a door that opens when you press a button
     
  2. Three Million

    Three Million L5: Dapper Member

    Messages:
    201
    Positive Ratings:
    65
    Use a func_button that will trigger a prop/wall to move via func_door. If this doesn't make any sense I can post a vmf of this as an example.
     
  3. Corfix

    Corfix L1: Registered

    Messages:
    29
    Positive Ratings:
    0
    could you give me an example
     
  4. SC PL

    aa SC PL local shitposter

    Messages:
    380
    Positive Ratings:
    401
    Example? Well I can show you as an image, but let me draw it
     
  5. SC PL

    aa SC PL local shitposter

    Messages:
    380
    Positive Ratings:
    401
    See.png

    And then on map when you'll shoot at the button brush, door will open

    PS: You can name door as you like, but then in func_button in a box, where is "door" text type instead a name of a door
     
    • Like Like x 4
    • Thanks Thanks x 2
    • Agree Agree x 1
  6. sooshey

    aa sooshey :3c

    Messages:
    522
    Positive Ratings:
    418
    Don't forget to set the door's open direction as "up" if you want it to open upward. It's in the keyvalues along with the door name.
     
  7. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,440
    Positive Ratings:
    1,192
    Learning I/O is actually required to make maps. Do so.
     
    • Respectfully Disagree Respectfully Disagree x 5
    • Agree Agree x 2
  8. Corfix

    Corfix L1: Registered

    Messages:
    29
    Positive Ratings:
    0
    i have followed your example but how do you close the door again.
    is always open when you press it once
     
  9. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,440
    Positive Ratings:
    1,192
    Valve have been kind enough to provide us with a Close output.
     
    • Agree Agree x 3
    • Respectfully Disagree Respectfully Disagree x 1
  10. Corfix

    Corfix L1: Registered

    Messages:
    29
    Positive Ratings:
    0
    so there is No Close output
     
    • Respectfully Disagree Respectfully Disagree x 1
  11. SC PL

    aa SC PL local shitposter

    Messages:
    380
    Positive Ratings:
    401
    Same as make an open one, but instead "Open" input you choose "Close" input
     
  12. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,440
    Positive Ratings:
    1,192
    oh shit, that's an input. Infinitely sorry.
     
  13. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,113
    Positive Ratings:
    6,084
    If you're going to make posts this unhelpful, why bother to post at all?

    To close a door, you need to send it a Close input. You can do that any way you want: you can send it from another button, or use the Delay value to close the door after a certain time.
     
    • Agree Agree x 1
  14. Narpas

    aa Narpas Failing at Scaling

    Messages:
    219
    Positive Ratings:
    203
  15. Three Million

    Three Million L5: Dapper Member

    Messages:
    201
    Positive Ratings:
    65
    Why doesn't someone make a vmf for @Corfix to look at and study? I would totally do it right now but I am a bit busy and afk.
     
  16. Corfix

    Corfix L1: Registered

    Messages:
    29
    Positive Ratings:
    0
    thanks for the infomation
     
  17. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,113
    Positive Ratings:
    6,084
    Because it takes longer to make a BSP than to answer the questions.
     
    • Agree Agree x 1
  18. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    It's a bit late, but since he's a beginner, this may still help him.

    Included is a VMF with 4 doors. Three are shown here (I'll get to the 4th one later)
    [​IMG]
    Door1 will open once you hit the button and it will automatically close after 3 seconds.
    Door2 will open once you hit the button if it is closed and it will close once you hit the button if it is open.
    Door3 will open once you hit the green button and close once you hit the red button.

    For the hammer part:
    door1.jpg
    The button is set to open door1 when it is damaged (hit by a player)
    The door has a delay of 3, so it will close after 3 seconds of being opened.
    The other doors have a delay of -1, so those doors will never do anything by themselves.

    door2.jpg
    The button here will "toggle" door2, so it will set the door in the opposite position of what it's in.
    For example, if it is open the button will close it and if it is closed the button will open it.

    door3.jpg
    This door has 2 buttons. One that opens it (green ones) and one that closes it (red one).

    Finally, we move on to #4, which is slightly more advanced.
    door4.jpg
    Door 4 does the same thing as Door 2, except it lets the user use the +use command (which is disabled by default anyway).
    We have "Damage Activates" Checked and use OnPressed instead of OnDamaged since damage will activate it, but so will +use.
    To use the command, you first must enable it in console with
    Code:
    tf_allow_player_use 1
    and then bind it to a key. EX:
    Code:
     bind O +use
    See the video for a better understanding.

    Cheers!
     

    Attached Files:

    • Like Like x 3
    Last edited: Oct 19, 2016
  19. Loth

    Loth L2: Junior Member

    Messages:
    78
    Positive Ratings:
    183
    super nice Em, this is really useful for lazy hammer logic illiterate peaple like me.
     
    • Funny Funny x 2
  20. Corfix

    Corfix L1: Registered

    Messages:
    29
    Positive Ratings:
    0
    Thanks for the vmf. It help Me better understand how It works