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"

Player Health and Damage system being multiple blueprints...

I've been searching on these few systems for the past 14 days and I have utterly confused myself beyond repair. I'm not even sure what I should ask here.

I know there are ten thousand threads about the Player Health and an additional ten thousand on causing damage to the player. Everyone I've tried to follow has failed with one error or another while compiling. I probably should have saved a couple to ask but got frustrated and deleted it and restarted.

I will have no UI for a health bar, only thing that I'm hoping to do is have a material popup on the UI covering the screen. The player is either alive or they are dead. There is no in between. Which, I think, is throwing me off on understanding the other threads about health systems. Could someone link me a thread, blog or video with a basic health system.

Damage System:

I have 2 meshes, each one I've created a BP for. Both of these meshes will cause instant death to the player, again there is no in between for alive and dead.

I have 9 levels created and I would like to do as little BP'ing as possible with these meshes. So I created a BP for the meshes and would like to have the damage system in the BP for the mesh... Does this make sense to do this?

The meshes will be used numerous times in each level.

Again, with the amount of searching, reading and watching I've done, I've confused myself with damaging the player.Again, Could someone link me a thread, blog or video with a basic damage system.

I really do hate having to bring up another thread, but out of the two dozen or more things I've tried I haven't gotten anything to work correctly. Maybe it's just a bad month for me to try to learn something new, who knows.

Anyway, any help would be highly appreciated for my confused brain.

If you need to know something, I'll do my best at getting that info for you, I'm still learning the layout and what everything does in UE4. :)

Edit: slight typo and: I forgot to mention, this is a 3D Side Scroller with Starter Content.

Product Version: UE 4.10
more ▼

asked Dec 15 '15 at 08:22 AM in Blueprint Scripting

avatar image

26 1 2 4

avatar image Ranz Dec 15 '15 at 09:30 AM

How is your damage dealing implemented? Is it when, player punches your enemy? or shoots at the enemy? how?

avatar image DSoS Dec 15 '15 at 09:33 AM

There is technically no other enemies other than saw blades and spikes. It will be onActorOverlap I think. As stated I am looking for a damage BP as well as the health BP.

If needed, I can take screenshots of what little I have, which is to say it's not much, as I've gotten frustrated and deleted most of it when it didn't work after multiple tries.

avatar image Ranz Dec 15 '15 at 09:35 AM

So if i understand this right, you have traps and it will damage your player, right?

avatar image DSoS Dec 15 '15 at 09:36 AM

yes, Instant death. Nothing more, nothing less. Health is either 100% or it's 0%

avatar image Ranz Dec 15 '15 at 09:39 AM

Try this:

Player BP

  1. Create a function that will cover the damage, for example: "KillMe"

  2. Then, just add a Print in this function to test if we are able to call it


  1. add a collision component then try the BP below:

  2. OnActorBeginOverlap --> Cast to PlayerBP --> Call function: KillMe

avatar image DSoS Dec 15 '15 at 09:54 AM

I'm not sure I understand what you mean by "add a collision component" is that the normal collision that I made through UE4? https://i.imgur.com/bYVCwjl.png

avatar image getnamo Dec 15 '15 at 10:04 AM

make a blueprint out of the spike, add a collision shaped, e.g. a box and then click the green + box in the bottom of details called OnBeginOverlap, make that one call the player function killme after casting.

avatar image Ranz Dec 15 '15 at 10:05 AM

you need to create an actor, a BP for your trap as well.

consider this like your player BP but you used the spike mesh instead

avatar image DSoS Dec 15 '15 at 10:22 AM

I don't think I'm doing this right...

I didn't see "OnActorBeginOverlap" in the collision box Details. https://i.imgur.com/lOzIcUk.png

Heres the PlayerBP KillMe variable https://i.imgur.com/VYfNMAt.png

On testing, nothing happened.

I've been at this all day. I'm going to go to bed, its past 4am. I'll continue this in the morning. Thank you, both, for the help so far :)

avatar image Ranz Dec 15 '15 at 10:32 AM

You missed the part were KillMe is a function. :)

avatar image DSoS Dec 15 '15 at 07:45 PM

okay, went back through it and this is what I have. Still nothing seems to happen? :| Kill Me Function: https://i.imgur.com/FHojXEX.png Spikes BP: https://i.imgur.com/aIbA7cx.png

I'm sorry, it just takes me a lot of effort to learn something. I'm a visual learner, so the documentation does help a bit but video/images/real-time viewing is much easier. I'll get it sooner or later.

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

2 answers: sort voted first

Hello DSoS,

As you wish to have a system where life and death are binary, either one or the other, having a health/damage system is entirely unneeded. Here is a quick setup of how to do what you're looking to do.

First, this is based off the Third Person Character template in 4.10.1

With this setup, we'll keep it as simple as possible so when the character is "Dead" it'll be immediately destroyed and disappear. First you'll need to create a new blueprint of the Actor type. Once you do that, add a "Static Mesh" component and apply whatever mesh you wish. After that, navigate to the "Collision" section of the details panel while still selected on the Mesh and set the "Collision Presets" to "OverlapAll". This allows us to pass through the mesh and use overlap events.

alt text

After that, all you need to do is add these nodes. You can add the event by selecting the Static Mesh in the Components tab and then right-clicking in the graph. It'll be located under "Add Event for Static Mesh > Collision".

Compile the blueprint, place the blueprint in your level and you're good to go. As soon as you touch the mesh, the character should be destroyed. If you wish to do anything else to your character after it is "killed", just replace the Destroy Actor node with whatever you wish to do.

Hope this helps!

blueprinthelp.png (319.5 kB)
more ▼

answered Dec 15 '15 at 11:01 PM

avatar image DSoS Dec 15 '15 at 11:58 PM

ooh, that worked. :D

Thank You everyone!


The Destroy Actor completely removes the player, correct?

How can I make the actor be impaled on those spikes, preferably at the location where it was hit, and have the body go limp and just hang until the level resets?

avatar image Matthew J Dec 16 '15 at 03:18 PM

Yes, Destroy Actor gets rid of the entire actor. The impaling would be much more complicated than this particular set up but you could do a slightly different version fairly easily. It would involve setting "Simulate Physics" on your Skeletal Mesh and setting it to only collide with the floor but not the spikes. That would cause it seem like the character is impaled on them. To do this however, the skeletal mesh will need a Physics Asset assigned and you'll need to learn how to use Collision Channels. You can find more information about those here:



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

Hi man , i know its quite confusing , keep it up. Here a simple one.! Actor trap- nothing but a collision box. Actor rock- sphere with physics enabled.

Trap check for the actor who enter in his collision , overlapping. and if is the rock , it will do some damage.. rockz , just fall and when touch the trap get his life damaged. if is 0 , the rock destroy herself.

Hope this help you understand the basics. Once you get it , you can add custom mesh at the traps ! alt text

more ▼

answered Dec 15 '15 at 02:56 PM

avatar image

1.2k 58 12 62

(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