Read Score from BP to display on UI/error.

Hi, guys, I’m a bit stuck, and can’t figure out the solution, maybe someone has a good insight on this.
Ive got the following setup.

In Mandiner Target BP, there is an Integer named “Score”. I want to read it from the widget and display it on the UI.
Instead of working, it gives me the error message:
“Error Accessed None ‘MandinerTarget’ from node ReturnNode in blueprint ScoreUI”
Does anyone know how to fix this?

I don’t quite understand what you are trying to accomplish with this blueprint. In the right side of the picture, what type of variable is this ‘Mandiner Target’ that you are setting? I tried recreating this blueprint but can’t find out what type of variable that is, if it is being set after casting to a blueprint with a similar name.

your cast node is missing a reference to an instance of a mandiner.

what class spawns your scoreUI, and what class spawns your mandiner object?

How do I give it a reference to mandiner?

The scoreUI is spawned in the Level Blueprint, the mandiner object is basically placed in the scene.

I was following the Unreal Docs tutorial:
https://docs.unrealengine.com/latest/INT/Engine/UMG/QuickStart/2/index.html
I’m doing for score, what he’s doing with ammo.

Basically I grabbed the link “AsMAndiner target BP”, and chose “Promote to variable”

Ok, I got it, I needed a Get Actors of Class node. Works fine, thanks! :slight_smile: