Problem: Communication Between Blueprint Not Working

Hey guys, sorry for the potential spam, but this is starting to drive me mad.

I’ve set up some weapons (amongst other things) in my character Blueprint, but to tidy everything up I want to move my weapon functions into Blueprints of their own… Only I can’t seem to get it to work.

I can all my other types of Blueprint to work with one another, it just seems to be interacting with blueprints extended from ‘Actor’. I’ve followed the documentation (Iterate all Blueprints derived from a class - Blueprint - Unreal Engine Forums) and I’ve watched the quick shot videos on youtube about communication, but following it perfectly doesn’t work. Am I missing something? If the weapon isn’t spawned in the world, does that make any difference?

I can call things from my character etc into my Actor blueprint, just not the other way round. Anyone know what’s going on or experienced the same problem?

Cheers!

c9726e4ee17d51fa68964cb6c422968d4da2815c.jpeg

ec476e09b5f4777401a5f76e85a3ca09d977459e.jpeg

Not the king of Blue Prints but from a programming point of view it does make a huge difference if you have an instance of an object or just a null variable where you can’t call a method on.

Best regards,
Isa

I was having similar frustrations for a while. Came across this tutorial by Tesla:

There’s a few ways to communicate between blueprints, but using an blueprint interface is by far my preferred method.

Cheers guys, unfortunately neither method seems to be working for me. I’ve got loads of Blueprint Interfaces in my game and again, they all work great when communicating between each other, except to actor blueprints and I’ve no idea why. I can only assume its the target that’s wrong, but again I’m not sure why its not working. :frowning:

To target an Actor blueprint, I just create a new variable, set it to the object type of the blueprint (ending in _c), make it public and connect it don’t I?

it’s better to cast to base and native class object than to pass to a function as a _C object. when you pass _C objects, it creates script dependencies.

From your screenshots it certainly looks like it should work. Is the variable correctly pointing at an instance of the pistol? You should be able to check by putting a break point on the call.

I think thats the problem. Using http://www.youtube.com/watch?v=xu1a9jFZc7g&list=PLZlv_N0_O1gaG5BW72It4chjhypxIO9ZB as reference, the difference is I don’t have either of my Blueprints placed in the level (so there isn’t an instance as far as I know). This is because one is my character, the other is effectively a random Blueprint.

Whilst this will eventually be a gun that you pick up and attach to the player in game, at the minute I’m trying to find the best way to link two Blueprints for my own knowledge. One option I could use (that I know works), is to set a variable in the character, then call the Action event inside the weapon and check against the variable using a Blueprint Interface… But I’ve seen people in other threads using this method, which appears much tidier.