6:45 for those of you who are confused about where you can get socket location, make sure you've set context-sensitive off in the drop-down where you pull up the BP nodes.
Just wanted to share for anyone struggling with making this work with a character that doesn't come equipped with a weapon, I have finally found a solution after 14 straight hours of banging my head against this issue myself. The solution was really simple. Just go to your character skeleton and add 2 extra sockets on the hand you will have your weapon equipped on and adjust the locations and rotations of those 2 sockets to match where the tip and bottom of your weapon would be respectively. Name the sockets and use those names in your notify BP. Worked like a charm. I'm not sure how this would work if you have multiple weapons that you switch between though as I only have one weapon so far. But unless there's a better solution out there(which I'm pretty sure there must be), my guess is that you will just have to repeat this same process for all the different weapons. Cheers :)
My solution was to put two sockets on the actual weapon skeleton and then just reference those sockets from your weapon instead of sockets from your character. So far it's working great.
If by any chance you will be able to explain how to build behavior trees that react to doing damage to npcs that would be really awsome. Like neutral npc becoming hostile if attacked and dropping agro when losing sight or something. Thanks for the video.
iT TOOK a lot of debugging to figure out how to incorporate this into my code. But overall 9/10 this was an amazing tutorial that didnt have me remaking code consistently to make it work. It was straight forward and helped me solve an issue id been dealing with for a couple days
Man your a beast I love these videos iv learned more from your videos in the 3 weeks iv watched then the whole 3 years iv been trying to learn this engine......thanks
yeah man, he's awesome. I went to school for this crap and I want my money back after these. They're way more concise. I wish I just paid Laley $30k to teach me game dev instead of wasting 3 years and 30k on garbage -_-
This works beautifully with your previous Patrolling/Chasing/Attacking AI videos!! Thank you! I tried with my own script (from other tutorials, i mean), but the enemy kept damaging itself when bumping into me. I disconnected part of that script, and used Apply Damage instead of Report Damage on my CharacterBP, and it finally applies damage/kills the AI correctly! Thank you!
From the test dummy Blueprint. You put If(!isPlaying) {playAnimation; printDamage;} 12:50 Won't this just stop printing the damage when the mesh is playing but in hindsight, the multiple damage from multiple line traces are still being acknowledged? I didn't see any code where it makes the mesh invincible, just filtering the printing of values when the animation is playing. Please tell me if I missed something.
@@ClassyCrustatio this fixed my print strings appearing more than once, but I can't seem to get more hits registering after the first one. Thanks for your suggestion.
I found a solution to the multiple hit issue. If you implement the SphereTraceByChannel method in the Event Graph of the Third Person Character, it only hits once. It also is important to play the Animation first, before the Trace is fired.
If anyone is having problems with animation and dealing damage. From the event anydamage do play montage then a delay...you'll have to mess with the timing and then whatever you want it to do after that. For the delay I did was 0.1.
This is a terrible way to do things as it is not based on timings. If you need a delay, you'll have to call a function. Either way, the way this video is made uses a terrible architecture to apply damage. A stronger one would be to have your player have an array of actors hit by the sword, when hitting a target, add unique and when the montage ends, apply damage. This limits how many times the enemy gets hit.
Can anyone explain how to reference a weapon attached to the character's hands? I feel like most games aren't going to have the top and bottom weapon sockets in the character's skeleton.
For anyone struggling with the TestDummy being frozen for 1 hit and it won't play the reaction. Change the skeletal mesh to Greystone as the animation "HitReact_Left" was linked to Greystone not SK_Mannequin. If there is another fix that'll let the mannequin play it instead would love to hear that as I was stuck with this problem and this was my fix to that.
Thats because you linked animation to UE Mannequin which is linked to different mesh, in that case to Greystone's. Just replace your default UE Mannequin mesh with Greystone's or any mesh with which animations come with
I understood that going stiff problem is from making sure to link each mesh like graystone and it's animations,, but If I follow this rules, My dummy looks Graystone .. how make dummy looks ThirdPerson??
Great, concise video, glad to come across your channel! One problem I encountered, since I’m using an animal but I made a mouth socket and was using the same start/end location for the sphere trace, how ever after a couple very frustrating hours I noticed there’s a bug within ue4.22 which makes the traces not detect anything. To fix this I just added a .1 difference to the end point … 😅
Hey Ryan, thnx for the videos. Really helpful stuff. I have a question, I want my character to switch weapons at runtime so my workaround for now was to add two basically invisible sockets that extend from my mesh to "represent" the sword. So now I've created the actor class with the sword and put it into my characters hand socket, so the question is how to I access the real sword sockets in my DealDamageNotify? I've made the sword a child actor of the player character, but I cant seem to figure out the nodes in the blueprint that will get me to access it's sockets...
You must go to your anim bp and in the anim graph add the slot your montage is set to after your default animation. This way it overrides the current animation with the montage in slot.
@@philzan3627 can you explain that even dumber pls. I made the montage, I set to play, i.imgur.com/pk0UlKU.png and I dont get the extra step you explained
@13:00 isnt is a best practice to always write your Branches to be a true statement to prevent bugs? E.G. "if animation is not/not playing do this (adding a "not node")"
So, if you having trouble if multiple notifies, try creating a simple montage notify, so when 'play montage' gets the notification you can start a timer by event to keep the sphere tracing on, then with a boolean, whenever damage actually happens clear timer.
Thanks for your video, helps me a lot, and I have a question about how to ignore duplicate hit notify? in your video, Notify State will check hit every tick right? so it will hit enemy many times, so it call applyDamage many times, I want to applyDamage once, could you give some advice? :D
So... for me, none of this works. The attack montage gets interrupted as soon as it begins, and visually doesn't play at all. Needless to say if the montage doesn't play, none of the following stuff will work. What can be a cause of this? Can't find any reason online for a montage to be interrupted on start...
One problem with this tutorial is that with Greystone his weapon is part of his mesh, it's not interchangeable outside "skins", so he has Sword Bottom and Sword Top, most games wouldn't be like this, Greystone just happens to be a moba type hero... So you don't see your weapons in the montage and you don't have a top/bottom.
@@RyanLaley How ?? If the animation of melee attack is done on the character but the sockets to be used are on the melee weapon... How to you refer to that mesh in your AnimNotifyState ?
I actually don't believe it's possible and went for 1 montage per weapon type ( different type of melee weapon, like baton, knife etc.. ) each class refer to it's montage. Every montage have sockets corresponding of the size of the weapon it represent. Let me know guys if you found better options.
It appears the Mannequin going into T-pose question is not answered, or I missed it. It appears the HitReact_Left is mapped to the Greystone skeletal mesh not the Mannequin. If you pick something lame like the Jump animation or anything in the Mannequin>Animations folder it will work.
I have a doubt, when u make the dummy to react to your hit, it appears to be that the dummty does not move, how can i make that dummy come back to idle ?? thank you very much
Great video. I really wanted to set a bool in the 'Notify Begin' to stop every tick from doing a trace and applying damage after the first one hits, but as you point out you can't set variables in this class. There's got to be an elegant way not to generate damage events on every tick?
I tried lots of things but everything that has to do with actual meele damage, runs into bugs sooner or later. The only non-clunky workaround seems to be the line trace method. I mean it only has to look like you would hit it :D
Try good nutrition and exercise, as well as ensuring they get consistent quality sleep each night. With enough care and attention, all of your enemies should be in fine health and be ready for the player to mow them down.
Thanks for the great tutorial. @11:27 "Event Any Damage" is not working on my Mannequin character. It shows the green trace of damage but doesn't show any damage number on the screen and I can not add any animation to that. Any solution?
If I wanted to play an animation montage when the AI gets hit instead how can I stop the hit sphere giving continuous damage ? As currently it only applies one dame when using the play animation node.
Pleas explain to me.. I just implemented a Sword mesh, made a slot in my Skeleton mesh Hand and put the sword in, put a box collision directly on my sword, very easy and now trigger this box on overlapping enemys trough notify i put on the attack animation, my question is: Why are most of these Tutorials so complicated? I mean i had no choice since i dont use a Paragon Char and i dont have the sword on my skeleton like you so i couldnt add notifys like you. So i made it this way and have seemingly the same result. I understand sometimes you have to do it a different way to it runs on server or somewhere else but this to me looks complicated
The fact that you sword touched the enemy doesnt mean a hit, like in real life. You maybe want to sync the hit detection with some specific moment on your attack animation, for example the moment where the sword has more velocity. This is a decent and efficient way to do this and less resources consuming than checking collision states all time
For my understading, for what you did, obviously it works. But, the question is , as you build further and further. You might want to trigger different things. Like hit location, changing equipments. Now, are you going to do everything one by one? Make it complex at first so that in the future, you can easily ADD stuff to the logic, NOT DUPLICATING the same logic over and over again. Hope this answer your question.
My sphere trace does not add as many as yours does, when ever i click it will either only trace 1 time, or 2 times. it looks like one at the beginning and one at the end. how do i fix this? and it keep hitting the ground
its a problem from your pc, it seems if the pc is slow and has a low fps then not so many hits appear, try playing from the windows that u have ur blueprints so that the screen will be smaller and it will be lighter to run. then you'll notice that more lines appear :P
im late but go to the end of the "event anydamage" script, right click and type in set animation mode and connect it to the end of the "event anydamage" script. it might work
I followed the tutorial and everything works but one thing. My line trace is always facing the same diretion so when I rotate its attack works differently
i'm having a weird problem my sphere trace get called just 4- 6 times during the montage and it miss the enemy multiple times do anyone know how to solve the problem ??
Any of your questions be answered by Ryan laley? probably not. Your tutorials are great thank you. That aside its purposely done to leave gaps so your project is incomplete making you frustrated. As a result you have to become a patreon and pay $$ to fix things not said in this tutorial hence "there are many ways to do said task" as said in all tutorials. This tutorial does what it says no more. despite that, this tutorial is great.
Glad you like the tutorials. The majority of my tutorials are purposely laser focused on one topic. The gaps aren't there make people frustrated but rather make it so it can be applied flexibly to whatever project they are working on. For example in this video, if I was to do a a whole combat system, it would be a long series; where most people will blindly copy what I do. Instead I want people to think for their selves and apply what they are learning to create the game they want to make, not the one I am making. Think of it like a buffet. You take the pieces what you want and make a meal out of it. It becomes your meal, done your way, just the way you want it. I am sorry if some people get frustrated by that methodology, but it is the best way to learn. I do try to cover as many individual topics as possible, and if there something missing from my channel that they want to see, I do encourage you and everyone else to let me know and I will try get to it.
@@RyanLaley Thank you! I withdraw the negative part of my comment before. I now understand your point of view and I apologise as I just started using the UE 4 and have been blindly copying what you do in hope to build a small game. My frustration got the better of me and clouded my judgment. I am watching more of your video tutorials and may consider joining your Patreon for help. Thank you Ryan
Great tutorial! but I have a little curiosity: is there a way to call in anim notify state a collider created inside the character blueprint with which to then apply the damage through the event any damage? Thanks so much!
the same happen to me, I realized that my weapon has physics on it. so you need to go mesh - filter collision and change the collision presets to Nocollision or whatever you need
Awesome video! Just wanted you to know I'm new to Unreal and all of your videos are like ESSENTIAL to my learning! Question about this one: How would you make the actor being hit play a different animation depending on where it was hit? I noticed in this one it's only playing the "hit from left" I believe. Again, thanks for the tutorials!
you just have to select different animation. its like A = A B=B C=C so, for each attack animation, there should be a different damage-received-animation
Hi Ryan, Great video! Thank so much for creating it. I've created a touch interface for my game and have the widget blueprint in place. When the on screen touch button is pressed the animation plays, it was in place before I watched your tutorial. To complete the tutorial I added a keyboard input action button. However when I disconnect the keyboard "input action" and plug in the "Press button A" from my widget the line trace no longer works. I cant work out how to map my widget button that plays the attack animation to an input action in the project setting. Any ideas?
I feel like this is a good tutorial up until the point you talk about how to deal with multiple traces. One instance where I can think of this going wrong is if your character takes a little tiny bit of damage from an enemy (1 damage or something) immeditely followed up by some sort of nuke, the character will only acknowledge the first instance since it's still animating.
So what you are describing is a real thing in game design called immunity frames. A lot of games use it but there are some that turn it off. It means that whilst you are receiving damage from an attack you are immune for a split second whilst an animation plays for example. To mitigate this looking weird you should design encounters where the player doesn't receive giant nuke like attacks at the same time as little ones. I for one can't think of an example of a game that has this example of damage distribution. But as I said, some games don't have immunity frames. To do that when another attack is received you stop the current animation reaction and start a new one receiving that new damage as well.
Hi, thanks for the tutorial! I noticed that your implementation of sphere tracing is dependent on notify state ticks. If I understand correctly, ticks are dependent on framerate. Hence, would this be a concern on machines with lower framerate?
I have a question, I really hope you see it. How Do I set up the SphereTrace, if I have weapons that can be unequipped (and are therefore not part of the character mesh)?.
I found out how to do it. For others with the same problem, heres how to do it: From "recieved Notify Tick" you want to get child component (which will probably be your scene component holding the weapon) out of "mesh comp" and then from that you get child component again. That will then be the sword and everything thats pulled from "mesh comp" in the video, you haved to pull out from the 2nd child component.
@@Patrick_Engels Hi, I have this exact same issue and your comment is very much appreciated! I am a bit confused though. Would it be possible to share a copy of your blueprint or screenshot so I can see exactly how you have it? I've followed your comment but still am having problems getting it running properly.
Hello there. Maybe a stupid question but fact is that I'm stuck with the dummy in T pose and no animation on it. How did you exactly specify the Test Dummy w/out compromising the principal animation of the main character on the scene. Thanks.
Thanks for the great video. The dealing damage works great in my game. The attack reduces the enemies health no problem. However when the enemy overlaps my player and they aren't attacking. They game plays my player damage animation and reduces the player health correctly, but then it generates a line trace that if the AI enemy is following the player character also reduces the health of the AI enemy, even though no attack has been performed. Any idea what I'm doing wrong?
hi, when i added the react hit left to the dummie, and try it, at the moment he take the hit, he revieve the damage 1 time he does not even do the movement, instead, the dummy stop working, he take a "T" position, and stop working. thx for the video, thx a lot, but help xD.
This doesn't work in multiplayer tho, for some reason the sphere traces "hit" doesn't register at all that im hitting the other character, however that instantly changes if i play in standalone, and yes, even the debug mode of the traces is not registering anything (changing color (?)) what can i do?
Excellent tutorial, but how do you make the UpperBody Attack Montage play in the direction/rotation that you're aiming? For example, when I look up/down when swinging the sword, the animation and trace still stay looking ahead, so it's impossible to hit enemies below or above me like this. Any ideas?
I replicated the same idea so that my enemy can damage me. The problem is, they also damage other nearby enemies. What logic do I use to make enemies only damage ME?
You cast the target to your player blueprint. If your player bp is called "3rd person character", the module name will be "cast to 3rd person character". If it's the player, the cast wil be sucessful, if it's somethine else, the execution will not continue. If you start the anim/deal damage behind this cast, you will not affect other entities.
Hey I was just wondering, in ur fps tutoiral how do u add more than 2 guns to the switch weapon function. If u could help with this, it would be amazing :)
Hello mate, thanks for your videos. I have an issue, when i hit the dummy, the anim plays, and then right after it, the dummy freezes, and the apply damage function is not printing anything anymore. Any idea?
Just a few minutes later.. I think I worked out a fix. I know it's been a year and you might already have solved it, but for the sake of others searching the comments: I put a Set Animation Mode node after the Play Animation node with a short Delay in between. Set Animation Mode to Use Animation Blueprint if if doesn't already default to it.
now how would we make it so any damage to a limb, cuts the limb off ? I want to shoot my aliens and cause damage, and have them keep coming at me, even if legless, armless... think monty python. I can still bite your ankles ! I assume I'd load a different mesh character ? one without the arm.. but how do we make it so it cuts where we shoot/ slice ?
6:45 for those of you who are confused about where you can get socket location, make sure you've set context-sensitive off in the drop-down where you pull up the BP nodes.
Thank you legend
Just wanted to share for anyone struggling with making this work with a character that doesn't come equipped with a weapon,
I have finally found a solution after 14 straight hours of banging my head against this issue myself.
The solution was really simple. Just go to your character skeleton and add 2 extra sockets on the hand you will have your weapon equipped on and adjust the locations and rotations of those 2 sockets to match where the tip and bottom of your weapon would be respectively. Name the sockets and use those names in your notify BP. Worked like a charm. I'm not sure how this would work if you have multiple weapons that you switch between though as I only have one weapon so far. But unless there's a better solution out there(which I'm pretty sure there must be), my guess is that you will just have to repeat this same process for all the different weapons. Cheers :)
I came to the same conflusion after a time. But still trying to find a way to do better
so, just found the solution. some guy commented here.
My solution was to put two sockets on the actual weapon skeleton and then just reference those sockets from your weapon instead of sockets from your character. So far it's working great.
Yet another incredible, clear, no faff tutorial.
Thanks, this has answered a few questions I had regarding dealing/receiving damage. Very much appreciated.
If by any chance you will be able to explain how to build behavior trees that react to doing damage to npcs that would be really awsome. Like neutral npc becoming hostile if attacked and dropping agro when losing sight or something. Thanks for the video.
what u are looking is for a harvest system
There was an entire series based off of that before you made this comment,
iT TOOK a lot of debugging to figure out how to incorporate this into my code. But overall 9/10 this was an amazing tutorial that didnt have me remaking code consistently to make it work. It was straight forward and helped me solve an issue id been dealing with for a couple days
Man your a beast I love these videos iv learned more from your videos in the 3 weeks iv watched then the whole 3 years iv been trying to learn this engine......thanks
yeah man, he's awesome. I went to school for this crap and I want my money back after these. They're way more concise. I wish I just paid Laley $30k to teach me game dev instead of wasting 3 years and 30k on garbage -_-
You always come in clutch Matt. You're the man
This works beautifully with your previous Patrolling/Chasing/Attacking AI videos!! Thank you! I tried with my own script (from other tutorials, i mean), but the enemy kept damaging itself when bumping into me. I disconnected part of that script, and used Apply Damage instead of Report Damage on my CharacterBP, and it finally applies damage/kills the AI correctly! Thank you!
From the test dummy Blueprint. You put If(!isPlaying) {playAnimation; printDamage;} 12:50
Won't this just stop printing the damage when the mesh is playing but in hindsight, the multiple damage from multiple line traces are still being acknowledged? I didn't see any code where it makes the mesh invincible, just filtering the printing of values when the animation is playing.
Please tell me if I missed something.
yeah I was thinking wouldn't a "do once" loop fix this
@@ClassyCrustatio this fixed my print strings appearing more than once, but I can't seem to get more hits registering after the first one. Thanks for your suggestion.
Wow, I did not know that you can do your own Notify state. That is awesome, thank you for this tutorial :)
I found a solution to the multiple hit issue. If you implement the SphereTraceByChannel method in the Event Graph of the Third Person Character, it only hits once. It also is important to play the Animation first, before the Trace is fired.
If anyone is having problems with animation and dealing damage. From the event anydamage do play montage then a delay...you'll have to mess with the timing and then whatever you want it to do after that. For the delay I did was 0.1.
This is a terrible way to do things as it is not based on timings. If you need a delay, you'll have to call a function.
Either way, the way this video is made uses a terrible architecture to apply damage. A stronger one would be to have your player have an array of actors hit by the sword, when hitting a target, add unique and when the montage ends, apply damage. This limits how many times the enemy gets hit.
what if i have a static mesh or actor as object ? how to i get start location and end location ?
Thank you so much bro.Im working on a action game.You videos are helping out a lot.
Can anyone explain how to reference a weapon attached to the character's hands? I feel like most games aren't going to have the top and bottom weapon sockets in the character's skeleton.
Very Clean , Simple Explain, I really liked it
For anyone struggling with the TestDummy being frozen for 1 hit and it won't play the reaction. Change the skeletal mesh to Greystone as the animation "HitReact_Left" was linked to Greystone not SK_Mannequin. If there is another fix that'll let the mannequin play it instead would love to hear that as I was stuck with this problem and this was my fix to that.
Dude I got to give you some money... Big mahalo for all your hard work!
Mine dummy just goes stiff and doesn't react when being hit, deals damage on first hit then nothing after that?
same :(
there's something special about that dummy for sure
Thats because you linked animation to UE Mannequin which is linked to different mesh, in that case to Greystone's. Just replace your default UE Mannequin mesh with Greystone's or any mesh with which animations come with
I understood that going stiff problem is from making sure to link each mesh like graystone and it's animations,, but If I follow this rules, My dummy looks Graystone .. how make dummy looks ThirdPerson??
Great, concise video, glad to come across your channel!
One problem I encountered, since I’m using an animal but I made a mouth socket and was using the same start/end location for the sphere trace, how ever after a couple very frustrating hours I noticed there’s a bug within ue4.22 which makes the traces not detect anything. To fix this I just added a .1 difference to the end point … 😅
Hey Ryan, thnx for the videos. Really helpful stuff. I have a question, I want my character to switch weapons at runtime so my workaround for now was to add two basically invisible sockets that extend from my mesh to "represent" the sword. So now I've created the actor class with the sword and put it into my characters hand socket, so the question is how to I access the real sword sockets in my DealDamageNotify? I've made the sword a child actor of the player character, but I cant seem to figure out the nodes in the blueprint that will get me to access it's sockets...
my character did not have an animation montage, so i made one for him , applied it to "play montage" when i click the animation doesnt play
You must go to your anim bp and in the anim graph add the slot your montage is set to after your default animation. This way it overrides the current animation with the montage in slot.
@@philzan3627 Saved my rear from undue stress! Worked like a charm :)
@@chainsawrabbit1832 No prob bro! There was another tutorial on the yt from pending kill that talks about damage too, worth a look!
@@philzan3627 can you explain that even dumber pls. I made the montage, I set to play, i.imgur.com/pk0UlKU.png and I dont get the extra step you explained
@@philzan3627 i have this problem too . Can i have in more detail. because
i am new to this program.
Awesome. Waiting for the next video :)
@13:00 isnt is a best practice to always write your Branches to be a true statement to prevent bugs? E.G. "if animation is not/not playing do this (adding a "not node")"
So, if you having trouble if multiple notifies, try creating a simple montage notify, so when 'play montage' gets the notification you can start a timer by event to keep the sphere tracing on, then with a boolean, whenever damage actually happens clear timer.
I wish I knew how to do this lol
very very very nice Tutorial, but i have a question.
I hit the target more than one times, how to fix this?
12:50
check the last part of the video.
Idk, something wrong with my project, so I can't help u atm, sorry
Dude, you are Amazing regards from México :D
Awesome stuff man! Keep it up!
really wanting to know how to build that dummy, mine just gets hit once and then it freezes. thank you for the tutorial, everything else went great.
It could be that you are using a montage with a play animation node? That happened to me today.
Thanks for your video, helps me a lot, and I have a question about how to ignore duplicate hit notify? in your video, Notify State will check hit every tick right? so it will hit enemy many times, so it call applyDamage many times, I want to applyDamage once, could you give some advice? :D
in ue4.26 seems like they replaced socket location's name with Skel comp...how can we use it as in this tutorial?
Make sure to select the transform one!
my character wont play the attack animation montage
Really nice video, thanks :)
So... for me, none of this works.
The attack montage gets interrupted as soon as it begins, and visually doesn't play at all. Needless to say if the montage doesn't play, none of the following stuff will work.
What can be a cause of this? Can't find any reason online for a montage to be interrupted on start...
Try adding the animations in the state machine, in the Animation Blueprint, and try again.
@@imadqadri Ah shit, I don't remember why this didn't worek. Should have answered my own comment, sorry.
One problem with this tutorial is that with Greystone his weapon is part of his mesh, it's not interchangeable outside "skins", so he has Sword Bottom and Sword Top, most games wouldn't be like this, Greystone just happens to be a moba type hero... So you don't see your weapons in the montage and you don't have a top/bottom.
You would just use the reference of the weapon mesh instead of the character mesh.
@@RyanLaley How ?? If the animation of melee attack is done on the character but the sockets to be used are on the melee weapon... How to you refer to that mesh in your AnimNotifyState ?
I actually don't believe it's possible and went for 1 montage per weapon type ( different type of melee weapon, like baton, knife etc.. ) each class refer to it's montage. Every montage have sockets corresponding of the size of the weapon it represent.
Let me know guys if you found better options.
It appears the Mannequin going into T-pose question is not answered, or I missed it. It appears the HitReact_Left is mapped to the Greystone skeletal mesh not the Mannequin. If you pick something lame like the Jump animation or anything in the Mannequin>Animations folder it will work.
The T=Pose is because of the animation blueprint. You have to set it in the viewport of the TestDummy.
Brilliant. Thank you
I have an issue where the character will show many print strings with only one attack
Thank you so much man i really needed this
너무 좋은 튜토리얼 감사합니다.
got any ideas on takedowns to grappling postions?
Thanks man, Great Tutorial!
Is there anyone who can explain how to make it only damage once instead of every overlap?
I need help, how do i do this using a combo???
also how did you get the hit react animation?
10:15 should be using LineTraceByChannel, not MultiLineTraceByChannel!
thank you for info
got stuck on "socket location" cant make that blueprint. 6:54
Does anyone know how to make this not deal damage every frame, but only once per attack swing?
i need it too, have you found the awser?
@@saruedev Change draw debug type to Persistent.
hi, nice video. Can I ask something. How you done play montage part?
I have a doubt, when u make the dummy to react to your hit, it appears to be that the dummty does not move, how can i make that dummy come back to idle ?? thank you very much
same here
same
Great video. I really wanted to set a bool in the 'Notify Begin' to stop every tick from doing a trace and applying damage after the first one hits, but as you point out you can't set variables in this class.
There's got to be an elegant way not to generate damage events on every tick?
I tried lots of things but everything that has to do with actual meele damage, runs into bugs sooner or later. The only non-clunky workaround seems to be the line trace method. I mean it only has to look like you would hit it :D
Bro thank you soooo Freaking much this video helped alot!!!!
how do i give the enemy health. how can you even deal damage if enemy doesnt have health
Try good nutrition and exercise, as well as ensuring they get consistent quality sleep each night. With enough care and attention, all of your enemies should be in fine health and be ready for the player to mow them down.
Thanks for the great tutorial.
@11:27 "Event Any Damage" is not working on my Mannequin character. It shows the green trace of damage but doesn't show any damage number on the screen and I can not add any animation to that.
Any solution?
May i Ask How Can i Put Damage Modifier for Different Sword Different Damage on a Notify State
Is this better than adding another collider to the character and attach it to the bone so it moves with the sword?
If I wanted to play an animation montage when the AI gets hit instead how can I stop the hit sphere giving continuous damage ? As currently it only applies one dame when using the play animation node.
Pleas explain to me.. I just implemented a Sword mesh, made a slot in my Skeleton mesh Hand and put the sword in, put a box collision directly on my sword, very easy and now trigger this box on overlapping enemys trough notify i put on the attack animation, my question is: Why are most of these Tutorials so complicated? I mean i had no choice since i dont use a Paragon Char and i dont have the sword on my skeleton like you so i couldnt add notifys like you. So i made it this way and have seemingly the same result.
I understand sometimes you have to do it a different way to it runs on server or somewhere else but this to me looks complicated
Game development is complicated. One tutorial isn't going to give you the perfect system for your game.
The fact that you sword touched the enemy doesnt mean a hit, like in real life. You maybe want to sync the hit detection with some specific moment on your attack animation, for example the moment where the sword has more velocity. This is a decent and efficient way to do this and less resources consuming than checking collision states all time
For my understading, for what you did, obviously it works. But, the question is , as you build further and further. You might want to trigger different things. Like hit location, changing equipments. Now, are you going to do everything one by one? Make it complex at first so that in the future, you can easily ADD stuff to the logic, NOT DUPLICATING the same logic over and over again. Hope this answer your question.
Does anyone know how I can deal damage once?... my enemy doesn't have a reaction animation... so I want another way
Did you know how to do it?? Thanks!!
@@jhonyfernandez2703 yea i found another way to do it
@@alisina4388 Could you tell me How? Please!
@@jhonyfernandez2703 th-cam.com/video/dxYDOOvqtQI/w-d-xo.html
here.... i used this... hope it help you
@@alisina4388 I will try it, thanks!
Thank You so much. Top1 unreal channel!
Cheers!
My sockets are in the correct places but the trace is at my feet not the weapon sockets ?
My sphere trace does not add as many as yours does, when ever i click it will either only trace 1 time, or 2 times. it looks like one at the beginning and one at the end. how do i fix this? and it keep hitting the ground
I Have the same issue, did you fixed it?
@@joaoairesdematos1024 i have the same issue, did either of you fix it?
its a problem from your pc, it seems if the pc is slow and has a low fps then not so many hits appear, try playing from the windows that u have ur blueprints so that the screen will be smaller and it will be lighter to run. then you'll notice that more lines appear :P
Weird, I have EXACTLY the same thing, and I have tried other nodes and it is not working, It won't play the montage.
Have you done a tutorial on say doing damage from a projectile? Like a fireball?
Hi, just a quick question how come when I hit the test dummy it does not return in idle pose it stays in the A pose, Thanks
im late but go to the end of the "event anydamage" script, right click and type in set animation mode and connect it to the end of the "event anydamage" script.
it might work
@@jacobbarrow532 GREAT THANKS! Just remember to put a delay about the length of anim before re-setting blueprint!
I followed the tutorial and everything works but one thing. My line trace is always facing the same diretion so when I rotate its attack works differently
What if it's an object that i want to damage? i can't really use the animation branch bool to limit the multiple trace hit
Brilliant but how can i make enemy character after damage return to idle anim
i'm having a weird problem my sphere trace get called just 4- 6 times during the montage and it miss the enemy multiple times do anyone know how to solve the problem ??
Any of your questions be answered by Ryan laley? probably not. Your tutorials are great thank you. That aside its purposely done to leave gaps so your project is incomplete making you frustrated. As a result you have to become a patreon and pay $$ to fix things not said in this tutorial hence "there are many ways to do said task" as said in all tutorials. This tutorial does what it says no more. despite that, this tutorial is great.
Glad you like the tutorials. The majority of my tutorials are purposely laser focused on one topic. The gaps aren't there make people frustrated but rather make it so it can be applied flexibly to whatever project they are working on.
For example in this video, if I was to do a a whole combat system, it would be a long series; where most people will blindly copy what I do. Instead I want people to think for their selves and apply what they are learning to create the game they want to make, not the one I am making.
Think of it like a buffet. You take the pieces what you want and make a meal out of it. It becomes your meal, done your way, just the way you want it.
I am sorry if some people get frustrated by that methodology, but it is the best way to learn. I do try to cover as many individual topics as possible, and if there something missing from my channel that they want to see, I do encourage you and everyone else to let me know and I will try get to it.
@@RyanLaley Thank you! I withdraw the negative part of my comment before. I now understand your point of view and I apologise as I just started using the UE 4 and have been blindly copying what you do in hope to build a small game. My frustration got the better of me and clouded my judgment. I am watching more of your video tutorials and may consider joining your Patreon for help. Thank you Ryan
Great tutorial! but I have a little curiosity: is there a way to call in anim notify state a collider created inside the character blueprint with which to then apply the damage through the event any damage?
Thanks so much!
When I hit the test dummy, he get's flown away in my game, how do I disable this ??
the same happen to me, I realized that my weapon has physics on it. so you need to go mesh - filter collision and change the collision presets to Nocollision or whatever you need
how do you make it so the character can die
When’s part 2 coming?
It's already out for patrons. And will be publicly available in a few weeks time
Awesome video! Just wanted you to know I'm new to Unreal and all of your videos are like ESSENTIAL to my learning! Question about this one: How would you make the actor being hit play a different animation depending on where it was hit? I noticed in this one it's only playing the "hit from left" I believe.
Again, thanks for the tutorials!
you just have to select different animation.
its like A = A
B=B
C=C
so, for each attack animation, there should be a different damage-received-animation
Hi Ryan, Great video! Thank so much for creating it. I've created a touch interface for my game and have the widget blueprint in place. When the on screen touch button is pressed the animation plays, it was in place before I watched your tutorial. To complete the tutorial I added a keyboard input action button. However when I disconnect the keyboard "input action" and plug in the "Press button A" from my widget the line trace no longer works. I cant work out how to map my widget button that plays the attack animation to an input action in the project setting. Any ideas?
I feel like this is a good tutorial up until the point you talk about how to deal with multiple traces. One instance where I can think of this going wrong is if your character takes a little tiny bit of damage from an enemy (1 damage or something) immeditely followed up by some sort of nuke, the character will only acknowledge the first instance since it's still animating.
So what you are describing is a real thing in game design called immunity frames. A lot of games use it but there are some that turn it off. It means that whilst you are receiving damage from an attack you are immune for a split second whilst an animation plays for example. To mitigate this looking weird you should design encounters where the player doesn't receive giant nuke like attacks at the same time as little ones. I for one can't think of an example of a game that has this example of damage distribution.
But as I said, some games don't have immunity frames. To do that when another attack is received you stop the current animation reaction and start a new one receiving that new damage as well.
The green isn't showing when I strike the dummy... I had to add a socket to the sword I'm using, is that what's messing it up?
make sure u add two get socket location bottom and the top and change trace channel to camera
@@GamesXDReal "Camera" solved it! Thanks
I have no get socket location node? Please Help!!!
Hi, thanks for the tutorial! I noticed that your implementation of sphere tracing is dependent on notify state ticks. If I understand correctly, ticks are dependent on framerate. Hence, would this be a concern on machines with lower framerate?
I have a question, I really hope you see it.
How Do I set up the SphereTrace, if I have weapons that can be unequipped (and are therefore not part of the character mesh)?.
I found out how to do it. For others with the same problem, heres how to do it:
From "recieved Notify Tick" you want to get child component (which will probably be your scene component holding the weapon) out of "mesh comp" and then from that you get child component again. That will then be the sword and everything thats pulled from "mesh comp" in the video, you haved to pull out from the 2nd child component.
@@Patrick_Engels Hi, I have this exact same issue and your comment is very much appreciated! I am a bit confused though. Would it be possible to share a copy of your blueprint or screenshot so I can see exactly how you have it? I've followed your comment but still am having problems getting it running properly.
Brilliant but how can i make enemy character after damage return to idle anim
Awesome!! Video
i dont have got hit animation. where to get it ?
How do you get the trace to only trace one time?
Hello there. Maybe a stupid question but fact is that I'm stuck with the dummy in T pose and no animation on it. How did you exactly specify the Test Dummy w/out compromising the principal animation of the main character on the scene. Thanks.
Thanks for the great video. The dealing damage works great in my game. The attack reduces the enemies health no problem. However when the enemy overlaps my player and they aren't attacking. They game plays my player damage animation and reduces the player health correctly, but then it generates a line trace that if the AI enemy is following the player character also reduces the health of the AI enemy, even though no attack has been performed. Any idea what I'm doing wrong?
hi, when i added the react hit left to the dummie, and try it, at the moment he take the hit, he revieve the damage 1 time he does not even do the movement, instead, the dummy stop working, he take a "T" position, and stop working. thx for the video, thx a lot, but help xD.
Muy bueno! Sigue así
This doesn't work in multiplayer tho, for some reason the sphere traces "hit" doesn't register at all that im hitting the other character, however that instantly changes if i play in standalone, and yes, even the debug mode of the traces is not registering anything (changing color (?)) what can i do?
try multi sphere trace by channle and then for each loop
Excellent tutorial, but how do you make the UpperBody Attack Montage play in the direction/rotation that you're aiming? For example, when I look up/down when swinging the sword, the animation and trace still stay looking ahead, so it's impossible to hit enemies below or above me like this.
Any ideas?
Choose a bone to blend that is above the ones that bend and twist for aiming. For example should bone
The number of line trace is actually frame dependent How can we have a lot of traces even if the fps is low
How you take a get socket location
thank you !
I replicated the same idea so that my enemy can damage me. The problem is, they also damage other nearby enemies. What logic do I use to make enemies only damage ME?
You cast the target to your player blueprint. If your player bp is called "3rd person character", the module name will be "cast to 3rd person character".
If it's the player, the cast wil be sucessful, if it's somethine else, the execution will not continue. If you start the anim/deal damage behind this cast, you will not affect other entities.
You can use the actors to ignore pin on the trace
Hey I was just wondering, in ur fps tutoiral how do u add more than 2 guns to the switch weapon function. If u could help with this, it would be amazing :)
10:04 just a bookmark
Hello mate, thanks for your videos. I have an issue, when i hit the dummy, the anim plays, and then right after it, the dummy freezes, and the apply damage function is not printing anything anymore. Any idea?
HI Gaël, did you end up figuring this out? I'm having the same issue and am trying to work out how to fix this.
Just a few minutes later.. I think I worked out a fix. I know it's been a year and you might already have solved it, but for the sake of others searching the comments:
I put a Set Animation Mode node after the Play Animation node with a short Delay in between. Set Animation Mode to Use Animation Blueprint if if doesn't already default to it.
@@tastysnak Thanks for the helpful comment.
@@MrMurp35 All good mate. I'm glad it helped.
now how would we make it so any damage to a limb, cuts the limb off ?
I want to shoot my aliens and cause damage, and have them keep coming at me, even if legless, armless...
think monty python. I can still bite your ankles !
I assume I'd load a different mesh character ?
one without the arm..
but how do we make it so it cuts where we shoot/ slice ?
Can You give me link for that hero and animations WHO Has a Sword?
www.unrealengine.com/marketplace/en-US/product/paragon-greystone