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.
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.
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.
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!
answered Dec 15 '15 at 11:01 PM
Matthew J ♦♦ STAFF
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
answered Dec 15 '15 at 02:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here