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"

Character health system not working?

My character is able to die however the health isn't working because my character dies in one hit. My character has 3 hearts (Health) and the enemy does 1 damage (1 Heart) However it just dies in one hit. Character Damage Receiver: alt text Chicken is damage causer: alt text

Product Version: UE 4.8
capture.png (335.5 kB)
capture(2).png (275.6 kB)
more ▼

asked Jun 26 '15 at 04:29 AM in Blueprint Scripting

avatar image

187 21 26 40

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

1 answer: sort voted first

EDIT: I looked at your the blueprints and I figured out your problem. Very simple math logic. Your setting your health variable to damage received - health :P. Flip them around and your set.

It's a little difficult to figure out what is going wrong with the limited information you've given us. When your debugging something like this it helps to have a healthy amount of output that you can always delete later.

Print out the value of damage taken whenever damage is received. Also make a print node after the apply damage node to see if it's getting called more than once. This is what I suspect is going wrong.

I blame any typos on my phone :).

more ▼

answered Jun 26 '15 at 04:57 AM

avatar image

199 31 29 51

avatar image KompaktKat Jun 26 '15 at 05:13 AM

That was it! Thanks, must have gotten my maths wrong again :) If you don't mind. I still need help having it update my health bar. I got my health bar to display. Now I just need it to update with the current health. This is the blueprints I believe are working: alt text alt text I think the problem may be here: alt text

working1.png (205.4 kB)
working2.png (261.4 kB)
nonworking.png (164.7 kB)
(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