How to get my doors to operate independently

I have a Door BP that on collision you press E and it opens up the Widget Keypad BP you input numbers and click enter, if incorrect it turns red and says incorrect if its correct it starts the custom event that opens the doors. I am able to set the passwords for each door inside the level with the variant I made and made it editable.

In my Widget Keypad BP I have it set to “get all actors of class” and I don’t know what to put in place of it or how to do it correctly. I tried creating a variable and making it a object variable for my Door BP but when I place it I get errors and it tells me the Door BP is trying to get NONE.

When I enter the correct passcode I have assigned to each door it opens the other ones.

Here is the blueprints. The Top part is the Widget Keypad and the Bottom Left is the Door BP

I am currently trying to learn how to use interfaces as I have not worked with that yet.

The wiget doesn’t need to know about the door specififically, it just needs to communicate the result back to the door.

I’m assuming the door makes the widget.

In the widget, make a type actor reference

( expose on spawn is needed )

Then, when you make the widget from the door, you can pass a reference in

image

and the widget can tell the door how successful the whole thing was

image

Hey ClockworkOcean!

I think im getting close.

Now when I enter the correct passcode at any door it opens just one door.

Im not sure if get actor of class is correct in my widget blueprint. Ill post the door bp as well with the actor I made in the next post.

Here is the door bp with actor

The widget doesn’t need to use getactorofclass. You’re passing the door reference when you create the widget.

The widget can then use an interface to send the result back to the door :slight_smile:

How do I activate the custom event that starts the door opening when the correct code is entered?

create another interface function (Open Door). If the passcode is correct have the widget use the door reference and call the open door event.

in the door use the open door interface event (implement event) to execute the opening logic.

Ah okay, interface. That what I am still looking to get knowledge of. I haven’t made one or know how to tackle interfaces yet.

I have a tutorial series for multiplayer doors and elevators using interfaces if interested. Not appropriate for the current discussion/thread. I can DM a link to you.

I will watch them, I appreciate it!

Probably need my hand held just to get this finished. Took in a lot the past couple weeks.

Was messing around with this

Thats as far as I have gotten with interfaces, that was made in the third_person character bp.

ouch, that get all actors of class…

You need to use a line trace to get a direct reference to the actor you want to interact with.
“Get All” is massively wasteful in this scenario. It should only really be used in general for one offs in which you store the results.

Yeah im not using that, getting rid of the one in my widget is what lead me to all this new to me interface stuff which looks like it will be a huge help once I get the hang of it.