Direct Blueprint Communications.What am i doing wrong?

Hello everyone,
I need your help to understand how Direct Blueprint Communications work because i am loosing my mind with this.
When i first started with Unreal about a month and a half ago i had a hard time understanding how things worked with Direct Blueprint Communications for a few days.But after some digging up i read the manual about it and it immediately everything became clear.I created the first example and VOILA!I could access the other BP variables.After that i learned about casting and everything worked wonderfully.
My problem is that for a few weeks now whenever i try to access a BP Without casting i get this

Is there a possibility that my project is corrupted or am i doing something wrong?
Only direct casting works for me .If i try to get control of a BP with the first method that the manual describes then i always get this error message.
Any help would be greatly appreciated .

First of all thank you for trying to help me.

Thats all to it.
Every time i try to call a blueprint with the above method i get those weird errors that in my humble opinion have nothing to do with anything.
What does your expertise think about this? is it normal?

Hello ,
I get these errors in everything i try to call…And this variable cannot be empty because the second my HUD is being created i imidietly save the screen resolution so i can use it later on for scaling my textures in the HUD.And to be honest this is just a picture i took because i happened to be there.I see the same error codes from one character BP to another.Although i can see the variables,get them ,set them etc the second i stop playin the game in the editor i always get an access error.Is this normal?

The error message states that the problem occurred in the construction script of coins_BP. Could you show us a screenshot of that?

Also tell how you populate “Access to UI BP” varable. Access none means you tried to make a call to empty varable

Hi -

Just to help us answer, could you give us the steps for how you made “Access to UI BP”?

Also, how do you make your coins? Do you place them in the level, or create them as you play the game?

Hello Lauren,
The coins are already placed in the level.
I click on add variable,i type inside the variable type the BP i want to have access to ,I choose the one that is under “object” with a _c at the end and then i click on the eye to expose it.After that i have access to everything but it is “always out of scope” and when i quit the play preview i get those weird errors from weird places(for example construction script).
What am i missing?Is there a possibility i am not doing anything wrong and my project has freaked out.I hope i am the one wrong here! :slight_smile:

Ok Lauren you rock!
Although i love you guys this is probably the most crucial thing in BP’s and i agree with you that the documentation is “lacking”. I believe that you need to show us more “real life” examples in your documentation so it would be easier for us to understand .
Now to the part i did not understand.
Lets say i have 2 bp characters with many instances each on my level.One is a turtle and the other one is an Archer.
Here you use the player controller to be able to cast and do all the rest.
In the example below how will i be able to cast to get the result i want ?.

I have a bool named “left” for my turtle.when it is true it walks to the left and vice versa.
Now in my archer BP i have a condition that says "if player is closer than 300 uu to self(archer) then set turtles(all of them) bool “Left” to “False”.
How on earth will i do this?I am lost!

Okay, thank you - that information helps a lot!

What is happening here is that you have basically created the box to store your HUD information in, by making the variable. That’s Step 1 - saying “My HUD is based on this kind of Blueprint”. :slight_smile: What you need to do next is fill that variable with information about the exact HUD you are using when you play.

Because you’re placing the coins in the world, if you click on one that you have placed, you should be able to see that “Access to UI BP” variable, with a dropdown menu. That menu probably says “None”. The easiest way to set that variable for all of your coins (because you’re generally always using the same HUD), is in that Coins_BP Blueprint.

If you set up something like this in the Event Graph of your coin Blueprint, it will automatically look up the HUD you are using, cast it to the right type, and then you can save it to that “Access to UI BP” variable that you need. That’s Step 2, and then you should be all set!

Is there anything here you need more explanation on? We hope to have more documentation over this soon, so any feedback would help. :slight_smile:

Hey ,

Epic staff are here to help with technical problems and editor-specific issues, not gameplay design questions. For questions like this one, you may want to try asking on the forums or in another Question thread.

My question has nothing to do with gameplay.I just made up an example so i can finally understand why i have BP communication problems .Basically what i was asking was,how do i access a BP variables from another one when both have multiple instances.In the example given by Lauren it is quite easy to understand since it had only one HUD.I wish there were more real life examples so we wouldn’t bother you guys so much. Thank you

I feel that the post from Dorman should be set as Answer not comment. that way people dont try to continue to help . Thank you