. The problem is that I need to put it in several places and it has to open different doors. If everything is fine with the first one, at the end I do trigger the door opening event. But what should I do with the second one if I just duplicate it on stage, it will tear off the same door as the first one. I can duplicate the keypad’s bluprint, but I don’t know how correct it is. Because if I need ten more of these, it’s not right to duplicate them all the time. So please help me. Can you tell me how to solve this problem? And please explain in more detail, so it will be easier for me to understand.emphasized text
I had a look at your script, but it’s a bit out of context for me.
However, in general, if you have a keypad actor and a door actor and you want different instances of the keypad to open different instances of the door , you need to have a variable that is a reference to an actor in the keypad actor.
Then, you need to press the little eye by the variable; this will make it instance editable. Then, in your code, use this reference to trigger the open event.
Now, in the details panel of the actor, you will be able to manually select the door you want the keypad to open.
Hi there,
As Edward mentioned, both “Door to Unlock” and “code” should be variables, editable, so each child BP can have a different code and door to open. Also, you’re using casting, so in the future, try to use blueprint interface messages to make your code cleaner.