How To Damage And Heal The Player In Unreal Engine 5 (Tutorial)

  Рет қаралды 53,317

Matt Aspland

Matt Aspland

Күн бұрын

Hey guys, in today's video I'm going to be showing you how to set up a system in which we can damage and heal our player within our game. This works with our health bar we created in the previous video.
How To Create A Health Bar In Unreal Engine 5: • How To Make A Health B...
Damage 1 SFX: freesound.org/people/Deathscy...
Damage 2 SFX: freesound.org/people/Deathscy...
Healing 1 SFX: freesound.org/people/SilverIl...
Healing 2 SFX: freesound.org/people/SilverIl...
Death SFX: freesound.org/people/MrFossy/...
#UE5 #UnrealEngine5 #UE5Tutorial
___________________________________________________________________________
00:00 - Intro
00:37 - Overview
01:50 - Damaging The Player
06:44 - Creating The SFX
07:49 - Damaging The Player
10:39 - Healing The Player
15:07 - Final Overview
15:22 - Outro
___________________________________________________________________________
If you enjoy make sure to subscribe: / @mattaspland
Join My Discord Server: / discord
Follow Me On Twitter: / matt_aspland
Follow Me On Instagram: / matt_aspland_
All My Social Media Links: linktr.ee/MattAspland
___________________________________________________________________________
If you want to support me, there are many different ways of doing so. This is by no means expected or required. It is just a nice support :)
Patreon: / mattaspland
PayPal: paypal.me/mattaspland?country...
Ko-Fi: ko-fi.com/mattaspland
Thank you :)
___________________________________________________________________________
To access the project files and screenshots from the video, check out my Patreon above!
My Public Video List: trello.com/b/7vJgXzBm
Unreal Engine 4 Tutorials Playlist: • Unreal Engine 4 Tutorials
The Basics Of Nodes Playlist: • The Basics Of Nodes In...
___________________________________________________________________________
♫Outro Song♫
●Kronicle - Chill Noons

Пікірлер: 71
@kevinhocking3531
@kevinhocking3531 Жыл бұрын
Thank you for sharing these techniques with everyone,, your videos and tutorials keep me from tearing my hair out when working UE5 😂. We appreciate the hard work brother!!
@wolfiedgr8t
@wolfiedgr8t 2 жыл бұрын
Cheers Matt, looking forward to the next video 😎
@samuraiyt4453
@samuraiyt4453 2 жыл бұрын
Saw the overview and looks useful! 😁
@nemesisgs2
@nemesisgs2 Жыл бұрын
09:38 To convert "Random Float in Range" into an integer... I added a fceil (Ceil Node) in between the 'Return Value' and 'Base Damage.' This rounds up to the next whole number
@speedwaylabsdev
@speedwaylabsdev 2 жыл бұрын
Hi Matt, I love your videos. If you need any ideas, I would love to see a tutorial where a player enters a multiplayer server, then selects the game mode, or pawn they would like to possess. For example, I'd like players to be able to select the 3rd person game mode or advanced vehicle gamemode upon entering the server.
@KutsalKurt
@KutsalKurt Жыл бұрын
Thank you so much for the video!
@artdrawing6682
@artdrawing6682 10 ай бұрын
nice totorial that is easy and clean thank you
@cryofravenia
@cryofravenia Жыл бұрын
You have to make an updated tutorial for FALL DAMAGE. That would be awesome. Waiting for it :)
@alexleveldesign
@alexleveldesign Жыл бұрын
Any suggestion on could it be the damage overtime working ? like a poison affecting the player or stepping on lava kind of things
@derf0007
@derf0007 Жыл бұрын
Hello, I have a question maybe you can help. After I added the dodge roll from your tutorial my character only faces forwards afterward. When he runs is only shows the forward animation even when he is moving side to side and backwards. He can still jump and roll, the only thing is his direction animation remains forward when running. Prior to doing a roll he runs fine and can faces all directions.
@nasrali1297
@nasrali1297 8 ай бұрын
Hi Matt, hope all is well. I am trying to decrease my player health gradually once seen by AI and I am having issues trying to apply the damage node. Any idea what should be in the player BP and in the AI BP. Appreciate your usual support and thanks in advance!
@studiobaxter1242
@studiobaxter1242 Жыл бұрын
fantastic, thank you.
@darkuskain
@darkuskain 6 ай бұрын
Hi Matt. Quick question! I've followed the tutorial and it works great. The only thing is, when i press "1" i heal fully instead of healing bit by bit. Have i missed something painfully obvious? Thank you!
@MartKart8
@MartKart8 2 жыл бұрын
It took me ages to get the healing system to work correctly, when taking damage from a Guardian beam attack, and Guardian Sky Watcher.
@ORANOID
@ORANOID 2 жыл бұрын
I know, what you can do about the poll, that you did a few days later. Even if you wouldn't include more personality into every video, you can in matt plays your games and defenetly in community game (if it is still in development). I am a bit sad because of the poll results. You are doing really great and I would love to know you a bit closer. Btw tomorrow is my birthday and English exams. You can wish me luck or happy birthday.
@MattAspland
@MattAspland 2 жыл бұрын
Great thinking, thanks mate. Happy birthday and best of luck with your exams too!! :)
@ORANOID
@ORANOID 2 жыл бұрын
@@MattAspland thank you.
@MovingTarget22
@MovingTarget22 Жыл бұрын
I’m having a issue with the block actually killing my actor, what could be the reason for this
@DarthTaterz7
@DarthTaterz7 Жыл бұрын
Hi im not sure if I missed an episode but im not sure how to set up a damageBP HELP??
@jasminerojas553
@jasminerojas553 5 ай бұрын
5:03 My health node doesnt have a target option. Is there a way to add the Target option?
@WesleyVanroose
@WesleyVanroose 2 ай бұрын
So how would you use a game instance with this? Because I try to make the health information come with me to the next level.
@user-rc8ev7wp7e
@user-rc8ev7wp7e Жыл бұрын
Thank you
@michaeltazor
@michaeltazor 5 ай бұрын
I never have have health widget ref for the damage system, i tried like 10 times, also i tried many other tutorials on youtube and it always ends up with the meter don't want to move anything, even i try 10 times, I'm using unreal engine 5.3, Would it be cause the engine update that the engine is changed ?
@hoigaming90
@hoigaming90 Жыл бұрын
Hi, can u make a video about health regen like... when you are NOT received any Damage in a period of time, then you will get Health Regen overtime
@staccatic
@staccatic Ай бұрын
Good tut, though using component overlap causes the enemy to damage itself because it's hitbox and model overlap.
@sam-nw6vy
@sam-nw6vy 3 ай бұрын
it only works once, do u know how to do it every time i go on the cube?
@ZimMabu_GameDev.
@ZimMabu_GameDev. 6 ай бұрын
Thankya bra
@TaiFails_
@TaiFails_ 5 ай бұрын
can i do this in the player controller?? thx
@HaikuTutorials
@HaikuTutorials 10 ай бұрын
Really nice tutorial. I wonder, is it the same process for Unreal Engine 4?
@MattAspland
@MattAspland 10 ай бұрын
It is indeed
@HaikuTutorials
@HaikuTutorials 10 ай бұрын
@@MattAspland Awesome, thanks mate :)
@studiodenne
@studiodenne 5 ай бұрын
Hi, Thanks for this tutorial, all works fine with one problem. When I get damage, I´m also get onehited. I´ve checked the code 100times, I changed the numbers, but always the same. Anyone an Idea? Thank you
@LordRage469
@LordRage469 2 ай бұрын
As far as the healing there was no health widget ref not sure when you made that. Must of been in the video at the end when you said it wasn't needed unless you play mobile or lower end pc. So i skipped it. Might be worth mentioning. I tried to make a reference to the widget but appears just leaving it out works just fine.
@3BEEZ
@3BEEZ Жыл бұрын
Can we have an update on how to apply damage within the Lyra Game?
@Panic.official
@Panic.official Жыл бұрын
Hi Matt, sorry to bother you but me and a few other guys here can't get the Health Widget Ref to connect to the Set health. Do you know how to fix that and can you help???
@leejay_0939
@leejay_0939 Жыл бұрын
Did you ever figure a solution?
@JHinsonMusic
@JHinsonMusic Жыл бұрын
Same here.
@andrewjwhitus
@andrewjwhitus Жыл бұрын
same...
@mrSleepyguy1
@mrSleepyguy1 Жыл бұрын
This is a little late but I guess maybe itll be useful to people later on but in order to get the set health with the target input, you just need to drag the pin off the widget reference and then look for "Set Health". Thatll give you the Set Health with the reference as the target.
@AliB0n
@AliB0n Жыл бұрын
I cant connect the health widget to the set health, has this been changed in updates or have I missed something?
@itzJeyz
@itzJeyz Жыл бұрын
did you get this working?
@Panic.official
@Panic.official Жыл бұрын
yeah did you manage to fix that? Same problem for me.....
@maxmiller5968
@maxmiller5968 Жыл бұрын
How to make it so that when you move to a new level, health remains at 50 percent, and not 100?
@__tezza__7567
@__tezza__7567 Жыл бұрын
How do I damage an enemy player
@perliczka336
@perliczka336 Жыл бұрын
I can't edit cube.
@davidmg512
@davidmg512 Жыл бұрын
Health bar only updates when it goes to 0 :(
@Skeltcher
@Skeltcher Жыл бұрын
How do I make a cube heal the player instead of damaging it?
@studiobaxter1242
@studiobaxter1242 Жыл бұрын
Try: 'Event actor begin overlap' then cast to the blueprint actor that you want to be the healing object (make sure it has a collision boundary) and then 'heal player'.
@MartKart8
@MartKart8 2 жыл бұрын
I feel one of the most important features of a game is, for example when it has multiple levels and the game requires you to have a set number of items to progress, say in Diddy Kong Racing the character needs a set number of balloons to open new doors. I followed your video called Save & Load Game (Statistics, Location & More) - Unreal Engine 4 Tutorial. I'm struggling with being able to save coins or rings for my character, if I load the saved level, I'm able to save the number of hearts, if I took damage working only. I feel I'm unable to call the function for my pickups to collect coins/rings
@PRiMezGFX
@PRiMezGFX 2 жыл бұрын
Are you wanting to carry items over to other levels? If so look at game instances. Game instances are a great way of carrying values to other levels. Hope that helps :)
@MartKart8
@MartKart8 2 жыл бұрын
@@PRiMezGFX Yes I don't know if you'll see this response as half my replies seem to turn invisible or don't seem to get posted back. I've looked on Tutorials on KZbin, they all say to use a Save Game and very few used a Game Instances as well, the methods on making this were all so different after that. One thing I'm finding frustrating is some creators are skipping chucks of information out, they don't explain how they connect information to other blueprints, I have learning difficulties and Autism. By the way a KZbin creator called MatDevelop said to me they will do a video on this subject as part of their GTA series, They do have an idea how to do this, but explaining this would not be possible. The person helped me out once, by showing me to use a BlendSpace 1D for Crouching and Swimming , being connected to walking and idle state, it helped stop my character from going into the crouch when swimming.
@PRiMezGFX
@PRiMezGFX 2 жыл бұрын
@@MartKart8 Hi Martin, I totally understand what you mean. There are some content creators out there who skip large part of important info. Most tutorials now days are people just showing you what nodes connect to other nodes and dont actually tell you the why. (This isn't a dig at Matt just at some tutorials or teachers in general. I believe there need to be more tutorials where the person goes into detail on some of the nodes (doesn't need to be all). It gets hard sometimes Martin but your doing a great job seeking out the information and asking for help. A good place to go when you get stuck is the 'Unreal engine documentation'. You can search for nodes and it tells you their purpose. Hope this helps you in some way.
@MartKart8
@MartKart8 2 жыл бұрын
@@PRiMezGFX I've tried to look up the documentation before, I found it very complexed, I find a lot of the information went into coding that needs to be hand written down. finding info on 4.25 is tricky as the website wants to show documentation for 4.26, 4.27 and 5. I stumbled on a tutorial yesterday called " Coin Collection Counter Game Instance" it's made by someone called "Victor Burgos Games", made in version 4.12.5. The person doesn't skip any information out. looks like the person stopped making tutorials 1 year ago though. The person went into creating a Game Instance and made a coin-ish collectable Blueprint and going into a new map, I've almost got it working the exact same way apart from it seems to add 1 extra coin to my total when I switch maps. I need to figure out how to save this with my save game object, combine the 2 together.
@MartKart8
@MartKart8 2 жыл бұрын
I checked again seems my coins are working correctly, seems extra coins are only added because I created a function in my Cat character (I created in Blender), Right mouse Button, is set to open level. I have a proper level end and level Entry I made and they work and no extra coins are added.
@virronenfin
@virronenfin Жыл бұрын
I did everything according to your video and checked everything more than 16 times, but nothing works for me. Can I contact you somehow?
@rttsh1616
@rttsh1616 Жыл бұрын
same did u find a fix
@owenstudios4107
@owenstudios4107 2 жыл бұрын
First
@diogogomes06
@diogogomes06 Ай бұрын
10:43
@jhnart0647
@jhnart0647 2 жыл бұрын
nearly first
@Fasyle
@Fasyle 10 ай бұрын
Would it not be simpler to invert your logic with Is Dead? Instead of constantly using Is Dead > NOT, just use Is Alive instead?
@Fasyle
@Fasyle 10 ай бұрын
p.s. Super helpful video, thanks for making this content.
@GZKilla1
@GZKilla1 Жыл бұрын
my character wont take damage looked over video multiple times, tried a pain causing volume instead of the cube, still nothing
@nimaxfn
@nimaxfn 2 жыл бұрын
first
@BrikPlace
@BrikPlace Жыл бұрын
6:34
@thomasr9557
@thomasr9557 2 жыл бұрын
Theres so many of them that only use walls.. they think if they stil
@nenosputros3102
@nenosputros3102 Жыл бұрын
bro idk if the video is just old but im having trouble with the image if your gonna fricking talk about doing it in photoshop for a health bar can you give us your health bar so we dont have to go through the trouble of making our own also make your videos step by step people like me are slow at this stuff you call this beginner level while your going through everything super fast and you did not have to make a whole other video for this system you could have explained it in the first video and its not like it even works also others said that they got not a single respond also please explain the process of 2d think that would be much more helpful like using paper2d i know this is a long comment and thats bcz im fricking pissed and this has happened before many times but i actually want this channel to go well and be good and actually work instead of just using your skills to get a quick buck off of youtube and instead teaching others like me
@liamology-youtube2906
@liamology-youtube2906 Жыл бұрын
ITS IN THE FUCKING DISCRIPTION IN OTHER VIDEO LEARN TO CODE NERD
@nenosputros3102
@nenosputros3102 Жыл бұрын
@@liamology-youtube2906 did not see the other video but how do you say i am a nerd and besides the image i got my own to work and his code still did not work for me so please shut the hell up
@Zsquiggles5
@Zsquiggles5 11 ай бұрын
Hey would you be available for a call? I want to interview you on game devopmemt.
How To Create A Main Menu System In Unreal Engine 4 | UE4 Tutorial
20:57
How To Make A Health Bar In Unreal Engine 5
15:19
Matt Aspland
Рет қаралды 71 М.
[Vowel]물고기는 물에서 살아야 해🐟🤣Fish have to live in the water #funny
00:53
Кәріс тіріма өзі ?  | Synyptas 3 | 8 серия
24:47
kak budto
Рет қаралды 1,6 МЛН
格斗裁判暴力执法!#fighting #shorts
00:15
武林之巅
Рет қаралды 41 МЛН
YouTube's Biggest Mistake..
00:34
Stokes Twins
Рет қаралды 69 МЛН
Unreal Engine 5 Health and Damage System Tutorial [2023]
27:12
Pixel Helmet
Рет қаралды 37 М.
Enemy Damage System in 7 Minutes! | Quick Tips | Unreal Engine
7:34
How to Make a 3D Health Bar for your Enemy in Unreal Engine 5
6:43
The Most Common Mistake Beginners Make in Unreal Engine | UE5
12:17
Ali Elzoheiry
Рет қаралды 82 М.
10 Unreal Engine 5 PLUGINS I can't live without!
9:37
Cinecom.net
Рет қаралды 427 М.
[Vowel]물고기는 물에서 살아야 해🐟🤣Fish have to live in the water #funny
00:53