Тёмный

Unreal Engine 4 Tutorial - AI - Part 8 Melee Attacks (Animation) 

Ryan Laley
Подписаться 105 тыс.
Просмотров 97 тыс.
50% 1

We are now going to put melee attacks into our AI behaviour tree and I show you how we use the animation blueprint to setup melee attacks using montages and blending by bones.
Link to Attack animation: 1drv.ms/u/s!AvfMAVHw1KCio4Ele...
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind the scenes videos on my projects and much more over at / ryanlaley .
Subscribe now to catch each video as they are released each week.
Follow me on Twitter: / ryanlaley
Like my page on Facebook: / ryanlaleygames

Игры

Опубликовано:

 

1 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 115   
@DangerSideburns
@DangerSideburns 4 года назад
When he fixes the error make sure you're setting your key in the behavior tree.
@jaxxrr
@jaxxrr 4 года назад
tnx man
@levithefisherman3363
@levithefisherman3363 4 года назад
Where do i set the key? Cannt get looping to work
@canisterbottournament
@canisterbottournament 3 года назад
@@levithefisherman3363 in loop path when you made BB_direction (it has to be instance editable) and in your behavior tree you should have 3 editable instances: BB Path Index = PatrolPathIndex BB Looping = PathLooping BB direction = Direction
@stuartwright2531
@stuartwright2531 2 года назад
Thank you legend!
@toniconge7003
@toniconge7003 4 года назад
OMG That's so cool! Combining the animations of running and punching into one! I always assumed that would be mega ultra super difficult while I don't 100% get how it works I do have it working on my level.
@ScoutOW2
@ScoutOW2 5 лет назад
Heres an idea for what i did. Instead of charging at you instantly, a small meter that they only go into combat mode if it becomes full, but if not in combat it slowly drains. Makes stealth games more enjoyable in my opinion.
@Lolpop751
@Lolpop751 5 лет назад
Amazing, thanks buddy! Would love if you go more into 'interface's - Haven't used them before and sound great for these types of thigns!
@peacockgames4364
@peacockgames4364 4 года назад
Not sure how many people this applies to, but if your character stops moving while playing the attack animation, make sure you have "Enable Root Motion" turned off. This can be found in the original animation sequence
@s.kanessuperbiatv6464
@s.kanessuperbiatv6464 2 года назад
This saved me bro
@shandybka
@shandybka 3 года назад
You are the best. Briefly clear and cool
@jasonfry920
@jasonfry920 4 года назад
Encase some of you find that your animation might not be working when implementing the Simple Parallel task, check your MeleeAttack task has the Finish Execute success flag ticked! This took me ages to figure out. Lesson learnt.
@alessandragarber20
@alessandragarber20 4 года назад
That animation really helps!
@canisterbottournament
@canisterbottournament 3 года назад
for those of you who don't see event melee attack, but you see the function version of it, just reassign the CombatInterface in class settings and reopen NPC
@user-th2ii9xx1m
@user-th2ii9xx1m 3 года назад
THANK YOU!!!
@vivegamespk
@vivegamespk 2 года назад
Learning alot from your tutorials
@GaryParkin
@GaryParkin 3 года назад
I'm not really sure I understand some of this, but I'm following along. (I have not messed with montage yet) Bt this is really cool. Thank you again Ryan.
@SCREAMOguy413
@SCREAMOguy413 4 года назад
you are a fantastic teacher!!!
@Bloodom1
@Bloodom1 3 года назад
Bro, you are an excellent teacher.
@RyanLaley
@RyanLaley 3 года назад
Thanks Jason
@wearetheroyalsgames1464
@wearetheroyalsgames1464 3 года назад
Okay, at first try i thought it wasn't working and very bad cause of that, but as usual i messed up big time by not paying enough attention, SO... Thanks so much cause you really helped me a lot and made my game so much better looking!! (As for my big time mess up.. i did everything in an animation instead of making a montage(Still a bit impressed on how far i came!))
@nothingspeaks
@nothingspeaks 4 года назад
to make it show the anim after you change the slot, you dont have to delete it, just grab (hold left clikc and drag) the green bar and move it a bit
@maxostlund9334
@maxostlund9334 Год назад
5:30 instead of clearing and adding the animation again you can simply save the montage, exist and reopen it. :)
@PatMan1220
@PatMan1220 4 года назад
THANK YOU FINALLYYY I CAN ATTACK
@nubsdubs6049
@nubsdubs6049 5 лет назад
For some reason it keeps attacking when out of range went from 500 to 250 to 1 it still swings aslong as it can still see the player even though its set to proc when within meele range
@ainigma100
@ainigma100 5 лет назад
When are you going to upload the attack-damage video. I do not know how to make the enemy attack me so that they can damage me. Thank you for the tutorials!
@josebenavides1850
@josebenavides1850 4 года назад
Have the enemy character play an attack animation and add an event notify to your attack animation montage called damage player or something like that. In the enemy animation blueprint create an event notify event for the notify you created in the montage. Every time the animation is played it will fire that event at whatever time in the animation you set it to. Have a line trace between the enemy hand or something to the player location. If there's a hit you know the enemy hit the player so apply damage to the player
@svenrawandreloaded
@svenrawandreloaded 4 года назад
is there a way to make it stay still and shoot a projectile instead?
@zinx-YT
@zinx-YT 4 года назад
If you can not find anim graph this is how to find it go to window what is on the top bar then click find results it should show on the bottom search anim graph if you not using the third person animbp it might look different
@sstudio5373
@sstudio5373 2 года назад
Thanks!
@levithefisherman3363
@levithefisherman3363 4 года назад
How can i set a blackboard decorator for "has patrol point assigned" so i dont grt errors for characters i want to be static until they see me
@Fettman89
@Fettman89 2 года назад
By the end of this video for some reason my Blend poses isn't working right, in stead of running and swinging, he runs, stops for his animation, then slides across the ground for a brief few seconds before going back to his regular pose again, I got a not a great fix by adding .5 second cool downs going between the paralell and change status, and he only slides across the ground a little less, but still does it.
@ThaGuyWithCake
@ThaGuyWithCake 5 лет назад
Looks like I keep getting errors.... When I play montage from the AI, the AnimBP stops previewing and will not work, even though I copied pasted the bone names it just stays in run animation... Please help.
@AlphaOmega
@AlphaOmega 3 года назад
@Ryan Laley i dont have got hit animation. where to get it ?
@juntaedmund8299
@juntaedmund8299 4 года назад
Hello great vid help a lot but one problem i'm having is after killing the player and the player respawn the NPC just stands there and not moving, can you explain how to set it so the NPC can start to roam again after it kill the player. Note: the NPC i'm working on is animals and weird creature's. thanks =^.^=
@happy-oni9240
@happy-oni9240 3 года назад
the character I created uses a full body attack. in this case do I have to still blend the walk and attack animations?
@Meeizter
@Meeizter 2 года назад
nice tutorials!! =) but this attack animation link aint working :(
@nightdragon4611
@nightdragon4611 3 года назад
This is my first go around at behavior trees and you do a great job at explaining it and how it works, I do have one question though, will I need a different tree for each enemy? For example I have a Troll enemy that I want to be very slow, but I can't edit the speed just for one enemy, should I duplicate just the tree? Or do I have to duplicate everything including the tasks?
@mwilsonjr92
@mwilsonjr92 2 года назад
I suggest making a children of the base AI and adjust the setting as needed for each of them.
@justindeines6724
@justindeines6724 2 года назад
I am having an issue that I cannot seem to figure out. I didn't create a montage because I want my AI to use full animation. So instead I am using the Play Animation node. What happens is, the AI uses the attack animation like it should, however the AI then stops every other animation other than Idle. Would I need to update the Anim script on the AI so that it can transition from the states? (I did try the montage but without making changes to bones and such, but the attack animation did not play.)
@originallmoney9099
@originallmoney9099 5 лет назад
Do you have a tutorial for adding this melee attack to a first person character? I could make the montage easy enough, but, I can't see my character attacking.
@brno322
@brno322 2 года назад
Agree this would be super useful
@BadWinterStudio
@BadWinterStudio 3 года назад
am i suppose to use the same skeleton for this to work?
@sdehues
@sdehues 5 лет назад
Around minute 8 when adding Slot to the ThirdPerson_AnimBP, the UpperBody slot is not available as a choice in the Slot Name dropdown box. If I click the magnifying glass icon next to the dropdown box to open the Anim Slot Manager, UpperBody is not shown in the ThirdPerson_AnimBP. When I switch back to the Montage it is there. AttackPrimary_A is in the Montage animation and UpperBody is selected there. Everything compiles and the level runs, but no attack animation. I have saved everything and restarted the editor without success. I've been through the video 3 times so I don't think I'm missing anything. Do you have any advice? I absolutely love this series of tutorials BTW.
@corej5424
@corej5424 5 лет назад
I've been having the same problem, have you found a solution?
@youviewteam
@youviewteam 5 лет назад
same here, i gone through the last 3 videos and i dont find anything i made wrong :( I just want the NPC to slap!
@nahiansharif4200
@nahiansharif4200 2 года назад
U have to do all of it just to play the montage regardless... I thought I could play it without doing the locomotion..... but I was wrong
@iliaspsomiadis319
@iliaspsomiadis319 5 месяцев назад
Ahmm 1 question, you use the same anim bp for enemy and character?
@finanzenkeine
@finanzenkeine 3 года назад
one of the best tutorials i had the pleasure to watch!!!!!!!! thx alot for making such awsome content gj mate
@sophhbophh4412
@sophhbophh4412 3 года назад
The melee attack anim over rides my idle anim. how do i fix this
@nisargpatel8974
@nisargpatel8974 4 года назад
click on windows, find anim slot manager and there u have it
@rosschampion89
@rosschampion89 3 года назад
still have that download link for anim?
@stinmanstew4582
@stinmanstew4582 3 года назад
how would i go about this if i have two different characters, myself(mannequin) and enemy(griffon from quadraped creature pack), each with their own animation. the attack works fine for me as im still playing as the mannequin but the griffon does not play the attack animation when it attacks! it is lunging forward so i can tell it is clearly doing the attack but no animation. Someone please help I'll love you long time, been trying to trouble shoot for 2 hours now
@augusttell
@augusttell 3 года назад
Also missing this solution
@cyberrb25
@cyberrb25 5 лет назад
The Event Melee Attack doesn't appear on the NPC Event Graph. Is there someone who can repeat all the steps to exactly get to it, so I can retry -- I'm not sure which are the ones required and which aren't.
@cyberrb25
@cyberrb25 5 лет назад
Update: I don't know what I've donde, but now it works. That is so confusing -- I won't know how to fix it were it to happen again!
@sonicherores
@sonicherores 5 лет назад
@@cyberrb25 I know its a late reply but I did the same mistake if I am right you forgot to compile on the CombatInterface after you typed in melee attack
@user-gn5lu9qe5h
@user-gn5lu9qe5h 3 года назад
Sorry i cannot access the attack animation link. How can I download it? Do you have other links?
@Dsean126
@Dsean126 5 лет назад
For some reason the montage fails to play the animation in the engine. Event Melee Attack is called, and it completes the play montage BP, but the actor itself isn't doing anything but its normal idle animation. Any ideas?
@yiannisathanasiadis4532
@yiannisathanasiadis4532 5 лет назад
I'm having the same problem. Have you found a solution?
@Dsean126
@Dsean126 5 лет назад
I haven't. Instead I changed the way the characters operate and made them run from the player, making it a game of chase instead of combat. I don't know if that idea is compatible with your design though.
@ambestenvideos1713
@ambestenvideos1713 4 года назад
@@yiannisathanasiadis4532 You have a 2 different AnimBP. Use your oldes or change for newone in Character BP, right upper angel - AnimBP - then change it
@LiliuD
@LiliuD 4 года назад
Same problem here , it plays the idle animation instead of the attack anim.
@meshock233
@meshock233 5 лет назад
Will there be a hearing perception?
@RyanLaley
@RyanLaley 5 лет назад
Yep. It's already out for my patrons. It's episode 10
@batmandoesntkill4744
@batmandoesntkill4744 4 года назад
Most of us have been following your videos cause, what you do can be followed by us.But many people including me are facing the issue of not seeing the upperbody slot at 8:03 that you selected. Can anyone help us with this error?
@sushicolada6463
@sushicolada6463 3 года назад
you need to make the upper body slot urself, there is a lot of tutorial about this, its pretty quick to make :)
@batmandoesntkill4744
@batmandoesntkill4744 3 года назад
@@sushicolada6463 thank man
@SomethingClever3385
@SomethingClever3385 4 года назад
i cannot follow along with this one. my screen montage windo dosnt have all of the things yours does and i cant seem to find how to open those things up please help
@RyanLaley
@RyanLaley 4 года назад
If a tab is missing in your screen, at the top click on 'windows' then turn on whatever ones you are missing
@righy2711
@righy2711 4 года назад
i know this has probably been adressed already by ryan, but, if someone wants to make the character/npc play the full animation, just do: add new boolean variable called IsAttacking and leave unchecked. on input attack add a branch, use IsAttacking as condition from false, set isattacking to true, then play montage from there from On Completed, drag a pin and set isattacking back to false. this wil make the actor check wether the montage is still playing or not.
@Fettman89
@Fettman89 2 года назад
Doesn't do anything
@righy2711
@righy2711 2 года назад
@@Fettman89 gotta seck isAttacking back to false once the animation plays...
@riskyumbrella4874
@riskyumbrella4874 3 дня назад
i did all of this and my npc mesh is completely gone, can someone help me
@rikidutta0
@rikidutta0 3 года назад
where is the link to the animation
@DeathIsSelf
@DeathIsSelf 4 года назад
i cant find upperbody slot like is as been shown at 8:02 (after creating it as shown a few moments earlier). i re-watched the video a few times, re-did it and read the comments but no real answer there. does someone knows what is wrong?
@ambestenvideos1713
@ambestenvideos1713 4 года назад
look at one video before montage / add slot / on right
@DeathIsSelf
@DeathIsSelf 4 года назад
i re watched part 7, nothing about animations there. what did you mean?
@ambestenvideos1713
@ambestenvideos1713 4 года назад
@@DeathIsSelf in this video 2:35 In right side Add slot add slot - rename Upperbodey slot done! do it in your ANIMATION, not in your ANIMATION MONTAGE!!!!! NOT IN PURPULE LINE DOWN, USE WITH GREEN LINE
@LordSionnach
@LordSionnach 4 года назад
Hey there. Did you ever make sense of what that person below means? I'm currently having the same issue you seemed to be.
@brno322
@brno322 2 года назад
which paragon character is this from?
@UnderfundedScientist
@UnderfundedScientist 4 года назад
2:53 glitch in the matrix
@user-yn6xr5fd9u
@user-yn6xr5fd9u 3 года назад
i can relate i have ADD
@N317V
@N317V 5 лет назад
How can I see all of the bones? It only shows me the mannequin and the bone I selected from the skeleton tree.
@RyanLaley
@RyanLaley 5 лет назад
In the viewport in the skeleton window. At tip it says view (if I remember correctly) and from there you can choose bones and view all
@N317V
@N317V 5 лет назад
@@RyanLaley It's Character -> Bones -> Bone Drawing -> All Hierarchy. But thanks for pointing me in the right direction. :-)
@N317V
@N317V 5 лет назад
Funny, I watched another video about animation and the first thing that comes up, is exactly that. :-D
@sdehues
@sdehues 5 лет назад
Link to Attack animation doesn't work for me?
@RyanLaley
@RyanLaley 5 лет назад
I have just updated it. Try it again.
@sdehues
@sdehues 5 лет назад
It worked fine today, Thanks.
@kimnorth7060
@kimnorth7060 5 лет назад
@@RyanLaley it doesn't work again :( . This is the error I am receiving Error code: SSL_ERROR_NO_CYPHER_OVERLAP
@kimnorth7060
@kimnorth7060 5 лет назад
That link is broken dude, can you please re upload?
@vekien
@vekien 5 лет назад
If you still need animations, you can get many from Mixamo, they all export to UE4
@kimnorth7060
@kimnorth7060 5 лет назад
Josh Freeman yup that’s exactly what I did. Cheers!
@ramn6679
@ramn6679 5 лет назад
How can this video have any dislikes??
@mwilsonjr92
@mwilsonjr92 2 года назад
anyone else have a problem importing the animation?
@RJ-zs5mo
@RJ-zs5mo 3 года назад
At 3:40 - "And this is what the montage screen looks like..." Um, no it doesn't. Not mine at least. lol I have no timeline that shows up in the middle of the screen like in the video. Then at 5:40 - Unable to figure out how to get the timeline to show up so I can drag the montage file onto it. Mine didn't show up by default, and following the descriptions in the comments didn't help unfortunately. Usually I can poke around and find the window I need to add, etc, but I'm totally lost now. I suspect there are some additional things one needs to understand regarding animation in UE, but I have very little experience in this part of the engine. Is there some preliminary setup I need to make sure the montage screen looks like that?
@RyanLaley
@RyanLaley 3 года назад
In 4.25 they changed the layout a little. Sections are now on the right hand side in their own panel
@RJ-zs5mo
@RJ-zs5mo 3 года назад
@@RyanLaley Thanks! Do you know which panel it is? I'm struggling to figure out where this timeline is now showing or where to drag the montage to. Did they change the way this process is done? I'm not familiar with animations in UE. There's a "Montage Sections" tab, but I can't drag anything into it.
@defiant4eva
@defiant4eva 3 года назад
@@RJ-zs5mo I am in the same boat. I have no idea how to set up this animation blend because I don't know where to move the animation too. Did you ever manage to figure this out. I looked in all the documentation sections, related to this and they are still showing the old montage section.
@RJ-zs5mo
@RJ-zs5mo 3 года назад
@@defiant4eva No I gave up on this tutorial since it was unclear and I couldn't figure it out.
@defiant4eva
@defiant4eva 3 года назад
@@RJ-zs5mo Okay I think I have figured it out, so I found this video explaining the changes of the montage system, and between that and the AI tutorial, I manage to work out how to get it to work. I hope it helps you as well. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_0Udq3On17E.html
@Tailslide1970
@Tailslide1970 2 года назад
Wasted some time trying to get this working on UE5. Tried following ryan's tutorial on retargeting animations to get this animation to work with the new mannys.. some of the joints came out weird. Faster solution is to use this to import mixamo animation and retarget: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qjQeUbGt4-4.html
@resurgammedia1511
@resurgammedia1511 2 года назад
awwwww I wanted fox and hound tutorial
@spectator59
@spectator59 3 года назад
I realise it's been a couple of years since this video series was made, so I'm sure you know this already by now, but with full-screen UE4, 1080p is barely enough resolution to be able to read the text. For future work, higher resolution would make things easier to see and follow. (also: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-CosTTHJBYIA.html)
@mdawid1812
@mdawid1812 4 года назад
You need to click Anime Graph on the left side to see this animation screen :) which was not said in the video
@SomethingClever3385
@SomethingClever3385 4 года назад
i have seen this twice now and i dont know where that is suposed to be? is that hiding in a menue somewhere? i cant even find in the unreal documentation where im suposed to go to turn that on little help?
@glennog
@glennog 4 года назад
Loving this series, but this and the last vid in the AI series triggered me... It's pronounced "meh-lay" not "mealy"
@RyanLaley
@RyanLaley 4 года назад
Lol sozza :)
@glennog
@glennog 4 года назад
@@RyanLaley forgiven... but only coz the rest of the content is bloody good :D
@TheJaguar1983
@TheJaguar1983 2 года назад
I know it's a nit-pick but I can't get past the mispronunciation of "melee". It's "may-lay", "meh-lay" or "meh-;ee". Never "mee-lee".
Далее
вернуть Врискаса 📗 | WICSUR #shorts
00:54
would you eat this? #shorts
00:23
Просмотров 1,6 млн
Unreal Engine 5.4 Motion Matching in 13 Minutes | 2024
13:41
Unreal Engine 4 Tutorial - Attack Combo
8:56
Просмотров 37 тыс.
Unreal Engine AI with Behavior Trees | Unreal Engine
26:38
Unreal Engine 4 - AI Basics & Patrolling (Easy Method)
16:00
Programming portals for my DOOM-style FPS
17:15
Просмотров 206 тыс.