I am trying to Print the boolean’s value set by the second actor from the first actor using a blueprint interface. Both actors have the interface implemented.
Maybe I’m not understanding how interfaces work at all, but “Event Build Phase” isn’t even being fired.
Sometimes you need to recompile both Blueprints after implementing the Interface.
And of course it won’t run on the actor you want; look at that:
“Target [self]”
You must insert there to that pin a reference to the actor you want to call the custom event. Not ‘self’.
I guess I’m not really following you on the target, I’ve tried the pin as both the interface reference, and the other actor reference, and neither have worked.
In your second picture(in the OP), you are calling the function ‘Build Phase’ on the second actor itself (see Target = self). So the boolean is set on the Second actor NOT the first one. Inroder to change the value on First actor, you should first get a reference to the first Actor, then call the function ‘Build Phase’ with the reference to first Actor connected to the Target pin.
Are you sure the reference to the first actor is valid at the time of call. Could you use ‘Is Valid’ node before calling the function and check if that is the case?
You are using the Local method and attaching the other actor’s reference to it. It won’t work either;
Drag from the other actor’s reference and search for Event Build Phase(message). The correct event to call is the one that has a mail icon, like this one upper node:
Then there’s something wrong with the Interface implementation.
If Other BP Ref is of type Actor, the (message) node should appear when you drag a pin from it. If it’s not a component of type Actor, correct that; You don’t need to cast to call the message, just need to be an Actor variable.
You havent assigned anything to it. You just defined a variable named ‘Other BP Ref’ and said its of type ‘Test Build Wall’, but it is not pointing to an instance yet.
You need to set this variable to an instance of ‘Test Build Wall’ before you could access it