x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can't get Health Value from Player to HUD

Hey guys. 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.

alt text

alt text

Product Version: Not Selected
Tags:
untitled1.jpg (366.8 kB)
untitled2.jpg (340.1 kB)
more ▼

asked Sep 03 '14 at 08:18 PM in Blueprint Scripting

avatar image

Raiden58237
97 14 21 27

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hey Raiden58237-

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.

more ▼

answered Sep 17 '14 at 03:33 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hey Raiden58237-

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

Cheers

Doug Wilson

more ▼

answered Sep 03 '14 at 08:44 PM

avatar image Raiden58237 Sep 03 '14 at 09:49 PM

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?

alt text

untitled.jpg (426.9 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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).alt text

healthbar.png (214.6 kB)
more ▼

answered Sep 04 '14 at 01:38 PM

avatar image Raiden58237 Sep 05 '14 at 11:43 AM

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?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question