I’ve been working on this for a couple of days, read threads and watched various tutorials, but I cannot seem to get my blueprint interface working. I’ve essentially got a static mesh target (a physical target to shoot) with blueprint functionality, which when hit with a projectile, toggles its visibility and sends an interface message using the “Target_1_Comm” function of the blueprint interface (name: Target_Comm).
Now I’ve implemented the interface on a separate receiving blueprint object (static mesh) that I want to carry out an action, added an blueprint “Event” for “Target_1_Comm” and given it a simple print string action, but the message does not seem to be arriving at the receiving blueprint. Everything compiles fine, but it just doesn’t work.
Can’t help feeling that I’m missing something simple. For example, is there some setting or parameter that prevents certain blueprints (in this case my receiving BP) from communication?
It comes back as “BP_Target_1”, which I think makes sense (essentially “self”). I did try it off the “Hit Component” node used for the toggle actions, but it made no difference.
Come to think of it, it probably doesn’t make sense as the actor I want to do something is neither the projectile or the target being hit. Guess I need to find a way of making a reference to the intended action blueprint available to “BP_Target_1”, which will send the signal once hit. Should this reference be created in the level blueprint. * I’m still trying to figure out refencing despite courses! *
So how does the button is supposed to know about another actor? How are they connected? Imagine there are 5 buttons and 10 domes. That’s how the editor feels - you need tell it who is who.
Is the button connected to the dome and there’s only 1 of each ever?
Yes, there is only one dome, and this is the only target to control it. I guess that the target is essentially a switch that toggles the static mesh blueprint (the dome) visibility. At the moment, they aren’t connected … I was trying to use the blueprint interface to do this.
I know they need a direct form of communication, it’s just trying to figure out how to implement this.
By golly … it worked. In particular, it was your 3rd step above that I was neglecting in previous attempts at direct communication. I was struggling and failing to set the default variable value (reference name, i.e. adome) through the Blueprint editor, and it didn’t occur to me that the default was set through the details panel of the corresponding world outliner object. Such a simple step as well …
I cannot thank you enough for taking the time to help me out with this. Much appreciated.