Making 2 requirments for 1 action

I’m very new and know only baiscs, so apologies for the “basic” question, however.

Ive made a door, when I go close it opens upwards automatically, but I have been trying to make it so: 1) I have to be next to the door (done) and 2) i have to press a button to open it.

I cant seem to find the solution. Any help, suggestions, ideas and explanation will be vert aprechated. Thank you.

Hey @SirSirus93! Welcome to the forums!

So what you need is to check two things, so you want to use an “AND” node! An “AND” node takes in two booleans and checks if both are true, in which case it will output true. If EITHER bool going in is false, it returns false.

In order to get your button to work, you need to set up a dispatcher. It will be located on the BUTTON (not the door) Check out this documentation and scroll down to “Event Dispatcher” and study it intently. Dispatchers are seriously the thing I wish I learned day 1 and waited far too long using workarounds to accomplish what a dispatcher would have instantly taken care of.

But basically you’ll use an event dispatcher on the button to set a boolean on the door to TRUE and then turn it back to false almost instantly (so you HAVE to be standing next to the door for both to be true, you can’t hit the button THEN walk up).

1 Like