Tring to cast variable from an actor bp to another

Hello, i am trying to get a button that when i get close to it sends the variable to the door which in turn opens it.

I’ve been trying to figure this out for hours now but can’t seem to get anywhere.

Any help is very appreciated

This is the overlap of the button

this is where i try to cast the other actor, but it doesn’t work

I am clearly missing something with the casting but I canonot find what

you never set the class on the get all actors of class node

personally though thats not the way i would go about setting up this script. what i would do is to use a public variable as the reference since its much cheaper, more reliable, and leads to a more versatile situation than using the get actors of class setup. to do this you would in your case create a variable in the door bp and sets its type via the details panel to the type clickbutton actor reference (as in the actor bp that you created). then hit the little eye box thing next to the variable in the panel on the bottom left to make it public. then once you place the door in the level you can select it and in the details panel you will be able to set the value of the variable.

my personal preference is usually to have the setup the other way around and have the switch reference the door but thats just me. hope that all helped