Unable to read variable from Actor Component

I have been struggling to get my text box function to read any variables from one of my actor component blueprints. The variable I’m trying to read(ContaminationTime - float) is public and editable.

138958-variable.png

Any help would be appreciated as this is kicking my butt

You made a Variable but this Variable is empty/none/null. You have to Set it first before doing anything with it. You can have millions of PlayerInventoryComponents in your world :stuck_out_tongue_winking_eye: you got to specify from what instance you want to get the Values.

Look at where you Spawn your Widget and make sure to pass it the correct Component or manually set it.

I’m sorry but can you elaborate on this? I have tried casting to the PlayerInventoryComponent blueprint but I don’t quite understand the object pin in relation to an actor component type blueprint so the cast always fails.

Uhm no mate Casting is something completly different :stuck_out_tongue_winking_eye:

You should have something like that in your Player BP

And if you ever want to make sure your Variable is not empty/none/null

And since you got trouble understanding what is what and when to use it watch this Video in Full it is worth the 2:20 hours and covers the Essential things anyone need to know.

Good Luck mate =)

This did it! Thanks for the help!