Download

Blueprint cannot communicate.

Hi There,
I am on 4.5.1
Would appreciate if you can help me out. I am struggling with 2 blueprints communicating with each other.

  1. I created a ‘painting’ blueprint, with the intention to change the materials .
    This has 3 custom events. For this discussion, we will just use the 2nd custome event, material trigger 2.
    58dedf3df69d05621229d41472dd8be3326b0ce4.jpeg

  2. I then created another ‘control’ blueprint, with the intention to call out my custom event in the painting blueprint.
    a5db4cb456200e71c2f422ca11912730fa156344.jpeg

The intention is that in this control blueprint, i will press the key ‘2’. And then it will call out my material trigger 2 custom event. And change the material on my painting.

I am not sure what i have missed out, but the painting just wont change material. There is no problem if i put everything under the same blueprint.
Appreciate if anyone can give me some pointers on this. :slight_smile:

If I’m not mistaken, you haven’t set your “NewVar” to anything, so it does not know to what should it change the material.

In other words newvar (iam asuming you did set the variable type to the blueprint type of your painting bp) needs to point to you painting blueprint in the sceneelse you call the event in a blank instance wich wont change the present one. Think of a tv remote if the remote isnt set to work with your television you can press but nothing happens

Howdy Sir,

Thanks for replying. Actually i have already pointed it to my original blue print. However, i noted that my blueprint does not end with an _C, but i noticed that in some of the tutorials when creating the variable, the blueprints end with a _C. Would this be an issue?

9a4525b7468651424cfa6a364072d55603012e0b.jpeg

What I mean is, a class blueprint is just a template for objects. What you need is a specific object whose material you want to change. Spawn one such object in your level, and then set your variable NewVar to that object. The rest should be OK.

Thanks for the reply.

I kind of understand the concept, but how do i actually do it. I already have one such object in the level. How do i point my newvar to that specific object?

Thanks a mil

One way is “Get All Actors of Class” another way would be to set the “Picture Actor” to perform a OnBeginPlay you would then do a GetPlayerCharacter or whatever you are useing. And then you cast it to your Playerthing and set your “Newvar” to “Get Reference to self”

this message is like registering with the player actor. Or well you could also spawn the thing on runtime you then can grab the referenc as an output pin of your spawnnode

oh you could also use an interface

For your newVar ( I assume this is the reference to the other blueprint), in the variable type, just type the name of the blueprint you want to communicate with. It should be there if it’s the same type of blueprint (actor, for example).

Hey Everyone,

Thanks a million for the inputs. I manage to solve the issue. Indeed the variable type needs to point to the object.

Its now working. Hehehe.

Thank you!!!