A door, button 1 OR button 2

Avatar
Bulska
204 Posts
Posted Dec 04, 2008
I've tried using the logic tutorial on the wiki but that didn't work.

I was hoping I could get a better explaination in the forums about how to open a door if button1 or button2 are pressed in. (Cube-buttons)

Advertisement
Registered users don’t see ads! Register now!
Avatar
VictoryIncandescence
48 Posts
Posted Dec 04, 2008
Replied 4 hours later
Just use a couple of logic_branches
Avatar
MrTwoVideoCards
584 Posts
Posted Dec 05, 2008
Replied 11 hours later
Or math_counter
Avatar
Bulska
204 Posts
Posted Dec 05, 2008
Replied 3 hours later
I tried using logic_branches.

I'm asking for an explaination of how to make such a door.
I don't hope you need an explaination of what an explaination is.

I know that it's possible with math_counter and logic_branches, but I dunno how.

Avatar
msleeper
4,136 Posts
Admin
Posted Dec 05, 2008
Replied 5 hours later
You need to setup your buttons to fire an Input to the logic_branch, and have your logic_branch (or math_counter) set to open the door whenever it receives any input.

Or did you want step-by-step, hold-my-hand, spoon-fed instructions? :rolleyes:

Avatar
VictoryIncandescence
48 Posts
Posted Dec 05, 2008
Replied 3 hours later
Here's how I'd do it

Button (give both the same outputs)
OnDown:
toggle Branch
open Door

OnUp:
toggle Branch
test Branch

Branch
OnFalse
close Door

Usually, it's pretty simple to figure out how you need to arrange things. Just think to yourself "What do I want happen when the button is pressed, and under what circumstances?"

In this case you would say "When a button is pressed, I always want the door to open. When a button is let up, I only want the door to close if the other button isn't pressed"

Advertisement
Registered users don’t see ads! Register now!
Avatar
Bulska
204 Posts
Posted Dec 06, 2008
Replied 13 hours later
I'm not bad in logic, I just didn't know how to use those entities.

ill try what ye posted.