Once again I know this is probably simple but the problem solving part of my brain does not work at the moment. At the moment I got my players health Value as an “int” in MyCharacter blueprint and has a default value of 100. Now I am trying to send that value from MyCharacter to the HUD but I can’t work out how to do it. This is confusing me now. How do I send it to the HUD and then get the value to display on the screen. I got a small setup already done on the HUD which I hope is right. Please help me. Thank you in advance.
It sounds like you need your HUD blueprint to receive a reference to the health variable inside your MyCharacter blueprint. The documentation here should help you in getting your blueprints set up to be able to see and reference each other: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/BlueprintComms/index.html
So I followed through the documentation that you gave me and it throws a compiling error and leaves my Health at 0 on the HUD. Any ideas?
A couple of suggestions to fix the error you’re receiving would be to go into the blueprint causing the error (which looks to be HUD_1) and detach all nodes from each other before compiling. After, reattach the nodes and compile again. If you still get the error you could try recreating the blueprint from scratch and then delete the old one.
For more help check out the image below on how to set up a simple HUD. For more details on this you can get the Content Examples project from the marketplace (Open the Blueprint_HUD level for more info on setting up a basic HUD).
I’m running engine 4.2.1, do you think this might be causing an issue with the blueprint as I am still getting the compiler error?
Are you still receiving the compile errors when trying to set your health? I believe upgrading to a newer version of the engine would solve the compile issues. The Content Example project on the marketplace should also contain some helpful information on setting up your HUD.