Controlling a door's state

Controlling a door's state

Hammer Mapping — Page [1]
ColinB

2009 Dec 12 • 48
Hello everybody,

I want it to be a normal door with the only difference that it refuses to act like a door when I press a button and when I press the same button again it acts like a door again. For example I want to be able to use it's flag 'use only' as well. I would also like to know how to make the door's primary state unlocked.
I know I'm an idiot for not knowing this but I'm stumbling around with this for quite some time now and I can't find the right answer by google'ing. Any help would be greatly appreciated.

Greetings Colin
 
 
 
2009 Dec 24 at 13:33 UTC — Ed. 2009 Dec 24 at 14:05 UTC
Mate de Vita
Kelli

2008 Oct 4 • 2453
159 ₧
ColinB said:
Hello everybody,

I want it to be a normal door with the only difference that it refuses to act like a door when I press a button and when I press the same button again it acts like a door again.

Give the button a name and put that name in the door's Master property.
Make sure you check Toggle in the button's flags.
ColinB said:
I would also like to know how to make the door's primary state unlocked.

It should be unlocked from the beginning if you don't set a master. If you mean in the previous example, you'll have to use this technique to set the button to On at the start of each round.
...and that's the bottom line because Mate de Vita said so.
 
 
 
2009 Dec 25 at 12:10 UTC — Ed. 2009 Dec 25 at 12:10 UTC
ColinB

2009 Dec 12 • 48
Perfect.

To share some knowledge: you can also replace the func_button by a func_rotating_door.
 
 
 
2009 Dec 25 at 13:03 UTC — Ed. 2009 Dec 25 at 13:09 UTC
ColinB

2009 Dec 12 • 48
I cheered to early. I happened to stand in a wrong distance when I tried opening the door to check if it was closed. I can use the door after I pressed the button. I pressed it twice to make sure. Perhaps you or somebody else have another idea?
 
 
 
2009 Dec 25 at 13:47 UTC
Mate de Vita
Kelli

2008 Oct 4 • 2453
159 ₧
Try making a multisource and target it with the button. Then make the multisource the door's master (instead of the button).
...and that's the bottom line because Mate de Vita said so.
 
 
 
2009 Dec 25 at 15:03 UTC
ColinB

2009 Dec 12 • 48
The previous setup didn't work. To be honest I'm still trying to make a setup like this. I'm wondering if anyone has an idea to make a door controllable by a button?

Greetings Colin
 
 
 
2010 Jan 7 at 15:03 UTC — Ed. 2010 Jan 7 at 15:07 UTC
SuperJer
Websiteman

2005 Mar 21 • 6666
I haven't done this in years but it sounds like you need a multisource as the door's master, as previously said.

I can't remember the details and i'd try it myself but I'm on my phone, at the hospital.
 
 
 
2010 Jan 9 at 07:16 UTC
ColinB

2009 Dec 12 • 48
I've figured it out. I'll name the entities and their properties.

Entity name: func_rot_button (the door)
Class Info
Name: door
Master: ms

- The button can be pressed only if it's master, the multisource, has met a certain condition.

Entity name: multisource
Class Info
Name: ms
Target: door
Global State Master: state

- By setting the Trigger Mode to Toggle the env_global creates two choices.

- The one choice is that the required condition is met. The other choice is that the required condition is not met.

- These choices are the states you can set the env_global to: On and Off.

Entity name: env_global
Class Info
Name: e_g
Global State To Set: state
Trigger Mode: Toggle
Initial State: Off
Flags
check Set Initial State

- By pressing the button you change the doors state.

Entity name: func_button (the button)
Class Info
Target: e_g
Flags
check Toggle

Greetings Colin
 
 
 
2010 Jan 18 at 03:24 UTC — Ed. 2010 Jan 31 at 13:24 UTC
Page [1]