can anyone tell me what i am doing wrong?
so here’s the deal,
The way i understand blueprint interfaces is that you make an interface blueprint-> let an actor call that interface-> interface passes through-> and an event takes place in an other actor.
but clearly i am doing something wrong! but I can’t figure out what!
Can you tell me?
You are calling the interface function on the “self” (calling) actor. Since that actor doesn’t implement the interface, the function isn’t called. It is also worth saying that there’s no reason to call an interface of your own.
So what I think you’re missing is you need to add an input parameter to the interface function so you can pass the “self” as a parameter. What you have now is trying to call the function of “self”. So you want to plug “Other Actor” from the event into the “Target” pin of the interface function call.
First, make sure both the calling blueprint and the target blueprint have the interface implemented. It would appear you’ve done this, but you never know.
Secondly, currently you’re trying to call the interface on “self”, which in this case is the switch. You need this target to be the door, since that is what you’re trying to trigger. This means you need a reference to the door you want.
The way I would do this is to create a variable for the door BP, then expose that variable. Plug that variable into the target of that interface message. I would then set that variable to whatever door I wanted in the world, using the defaults on the switch instance. This gives you your reference. That way on component hit, it would trigger that interface message on whatever door I specifically told it too.