hl1 buttons... Created 14 years ago2010-03-07 15:18:03 UTC by Bahurs1 Bahurs1

Created 14 years ago2010-03-07 15:18:03 UTC by Bahurs1 Bahurs1

Posted 14 years ago2010-03-07 15:18:03 UTC Post #279538
Hi, I need a button that deactivates other button. This is for a door lock that when you press a button, door opens. when you press the other button, 1st button deactivates and closed the door.

so, if this is possible...please tell me how:)
Posted 14 years ago2010-03-07 16:04:02 UTC Post #279540
You'll need to use masters, and a third button/door hidden outside the playable portion of the map.
Take a look at the tutorials, I'm postive there is a master tutorial.
Notewell NotewellGIASFELFEBREHBER
Posted 14 years ago2010-03-07 20:26:48 UTC Post #279542
Does the action have to be repeated? What happens if you press button 1 with the door already open? Can you open it again with button 1 after it has closed?

Maybe it can be done with some changetargets.
Posted 14 years ago2010-03-08 11:36:44 UTC Post #279555
ok lets see...

[door open]
Press button 1.[door closed]
If button 2 is pressed [door closes and button 1 is not usable]
If button 2 is pressed when [door closed]-[door close][button 1 is usable again]

hope that this is not to complicated and all...

oh yeah...
this is for a train or a room ect. ...which is like this:
you can go in it by pressing a button[door opens]then inside you can close the door and lock it.you can unlock it to.
Posted 14 years ago2010-03-08 15:51:46 UTC Post #279561
I'm sorry, I don't quite understand that... :S
Posted 14 years ago2010-03-08 18:09:05 UTC Post #279566
lol im sure its possible. Try using change targets. As for the door closing when button is pushed just make the door delay before closed a few seconds so it always closes but is only openable while the button's target is the door.
Posted 14 years ago2010-03-09 10:52:01 UTC Post #279579
the button that open and closes the door isn't very important...I could go with the way by touching the door making it open.I mainly just need a button that closes and locks the door.
Posted 14 years ago2010-03-09 15:28:12 UTC Post #279582
In that case you'd need something like this:

1. The door (doesn't matter if it's triggered or not)
--> Have its master set to a multisource entity.

2. The locking button.
--> Have it target the above multisource.

The above setup will deactivate the door whether it's open or closed. If you need it to close before locking, the door would need to trigger a trigger_changetarget that makes the locking button target a sequence that first closes the door and then locks it.

You'd have to play with the door's "trigger" and "fire on close" properties to fire two different changetargets for the button (one for closing and locking, and one for locking only).
Posted 14 years ago2010-03-15 09:21:58 UTC Post #279710
um...I'm not that good in 'english' or that much in hammer and all...could someone make an example map? That would be great..;)
You must be logged in to post a response.