Unreal Engine 4 - Enemy Targeting System & Switch Attack Stance

  Рет қаралды 37,906

Beardgames

Beardgames

Күн бұрын

Пікірлер
@Beardgames
@Beardgames 3 жыл бұрын
Want to upgrade this system so you can swap between targets on the left and right? Check out my update for this :) kzbin.info/www/bejne/pai9q2Ccm7qtqcU
@Pontos420
@Pontos420 3 жыл бұрын
Just... nice!
@mattice9083
@mattice9083 2 жыл бұрын
this is very well done. what i am thinking is how do i do something where when i push attack, the character "locks on" and attacks the cloest/ most center viewed enemy
@DevilFruitJourney
@DevilFruitJourney 10 ай бұрын
I would subnif you could explain how to swap between mutltiple enemies by using the mouse wheel. I think many other people would too :)
@josecervilla5362
@josecervilla5362 2 жыл бұрын
Sometimes the animation shakes, I see that it happens to you too 11:44 Why is this? I'm going crazy, trying to fix it, and I see that in your flex combat project it doesn't happen, is a bug of the animation?
@kajoxu
@kajoxu Жыл бұрын
Did you find out how to solve this? I have big problem with it, and i need help.
@boostedplayer503
@boostedplayer503 3 жыл бұрын
You made it soo easy. Everyone else was making this a big mess. Thanks alot.
@Beardgames
@Beardgames 3 жыл бұрын
Anytime brother :)
@realdlps
@realdlps 3 жыл бұрын
Oh boy the thirdpersoncharacter blueprint has a lot of stuff now, Awesome vid :)
@Beardgames
@Beardgames 3 жыл бұрын
Thanks as always amigo :D
@MartKart8
@MartKart8 Жыл бұрын
I had to redo this again, and now the lock on works.
@호경-p6x
@호경-p6x 2 жыл бұрын
Smartest and kindest youtuber I'd ever seen, bro!😀
@Beardgames
@Beardgames 2 жыл бұрын
Much love amigo that's very kind of you to say. Keep smashing it for me!
@jmarte6089
@jmarte6089 Жыл бұрын
You are awesome. Keep up the great work!
@jordanabbatiello
@jordanabbatiello 2 жыл бұрын
great tutorial, also subscribed right after your suggestion.
@Beardgames
@Beardgames 2 жыл бұрын
Thanks for supporting the channel Jordan it's much appreciated :)
@notinuse9999-c3y
@notinuse9999-c3y 2 жыл бұрын
I still so those red and green lines you have at 6:00 , how do you get rid of those?
@BenMolgaV2
@BenMolgaV2 3 жыл бұрын
This is what iv been looking for thx so much
@Beardgames
@Beardgames 3 жыл бұрын
No problem at all! Thanks for supporting my channel :)
@ВладимирСваталов
@ВладимирСваталов 2 жыл бұрын
Я сильно благодарен тебе за качественные видео, двигайся в том же духе(I am very grateful to you for high-quality videos, move in the same spirit)
@ondria6334
@ondria6334 2 жыл бұрын
Hi I am trying to follow your tutorial but It seems like you didn't mention the ready to attack or weaponready variables etc? Please could you let me know which tutorial you mentioned to create them in. Thanks 1:21
@notinuse9999-c3y
@notinuse9999-c3y 2 жыл бұрын
Not relevant to this tutorial
@garrytalaroc
@garrytalaroc 2 жыл бұрын
Thanks man, you're the best.
@Dream-Big-Studio
@Dream-Big-Studio 3 жыл бұрын
Thank you so much Sir. i am a big fan of yours.
@nierautomata9654
@nierautomata9654 3 жыл бұрын
Well explained Teacher ! another lesson learned :) Thank you!
@Beardgames
@Beardgames 3 жыл бұрын
Anytime amigo :D
@gil6970
@gil6970 Жыл бұрын
How can I make it so I can move the camera left and right when locked on? The camera is always locked in. I’ll like to keep the character strafing and facing the enemy. But able to move the camera around. Can you please help
@TheGhos1Face
@TheGhos1Face 3 жыл бұрын
Ohhh nice one my g!!!
@Beardgames
@Beardgames 3 жыл бұрын
Thanks bro :D
@codyvandal2860
@codyvandal2860 3 жыл бұрын
Nice job man keep them coming
@Beardgames
@Beardgames 3 жыл бұрын
Thanks man!
@davida4641
@davida4641 3 жыл бұрын
Hi, when the A.I character approaches and gets close, the camera pivots to a a bit of a birds eye view. Is there any way of preventing this when the character gets close?
@christofferplatou2828
@christofferplatou2828 Жыл бұрын
Still wanting to know this too
@Lumhax
@Lumhax 2 жыл бұрын
Hi ! Amazing one, do you know how to draw icons on the ennemy ?
@DevilFruitJourney
@DevilFruitJourney 10 ай бұрын
You need to creat a widget. Then assign this widget to your character/enemy. Then put some Logic to make this icon visible
@aibon7070
@aibon7070 3 жыл бұрын
Very nice Tutorial! Good job
@Beardgames
@Beardgames 3 жыл бұрын
Thanks so much ibon!! :)
@DarkKiller-so3jp
@DarkKiller-so3jp Жыл бұрын
Great tutorial! I got a question though, how would I make the targeting system dynamic in which the camera will automatically adjust it's self so both the player and the target is always visible on screen? Currently is there is a group of enemies or I'm too close to the target, it can be very hard to see the target clearly so I would really want the camera to adjust itself by moving left or right so both the player and the target are always seen clearly. Any ideas on how I can achieve this?
@troyhayder6986
@troyhayder6986 3 жыл бұрын
Posted my lock on on my channel... You fing genius... Unlike batman my character always goes in the direction I'm holding... Cause I'm not shit...
@jankystreams3337
@jankystreams3337 2 жыл бұрын
For some reason my character is not strafing whenever he locks onto the target. I am almost 100% sure I connected everything correctly, do you know why this might be happening? Also, regardless if I get this fixed, this is a GREAT video, it was really easy to follow and it helped me out a ton. EDIT: I fixed it. I made a dumb easy to fix mistake.
@stinkbruh8178
@stinkbruh8178 Жыл бұрын
how did you fix it brotherr
@Legend64Project
@Legend64Project 3 жыл бұрын
Thank you for the tutorial it was very helpful. Do you have a part two for how the camera will lock off depending on the distance away from the target?
@Beardgames
@Beardgames 3 жыл бұрын
Unfortunately I dont however you can just use the "get distance to" node with the player and the AI, when its greater than a certain distance call the target event again to untarget :)
@Legend64Project
@Legend64Project 3 жыл бұрын
@@Beardgames Thanks Beard! Do you know how to set up a switch to a new target? I keep locking on to the same one...
@Beardgames
@Beardgames 3 жыл бұрын
@@Legend64Project check out my badass features video, we go over switching between the left and right enemies :)
@MZONE3D
@MZONE3D 3 жыл бұрын
Nice one mate. Just what I was after. Cheers
@Beardgames
@Beardgames 3 жыл бұрын
No problem amigo :D Thanks for supporting the channel!
@MZONE3D
@MZONE3D 3 жыл бұрын
@@Beardgames alright mate, that worked like a charm... it would be cool though to add some kind of marker above the head of your target? how would ya go about that? add a billboard and make it visible on locked?
@Beardgames
@Beardgames 3 жыл бұрын
@@MZONE3D glad to hear it pal! I'm working on a tutorial now where we'll add a marker don't worry I got you :D it will only be available for early access until I release another video after that though so you'll have to wait a couple days for it :)
@afiqzak8345
@afiqzak8345 3 жыл бұрын
thanks, your tutorial really helpful :)
@Beardgames
@Beardgames 3 жыл бұрын
Anytime afiq :)
@S1yGus
@S1yGus 3 жыл бұрын
Спасибо из России, мужик! Урок - годнота!
@tgykurtulus
@tgykurtulus 3 жыл бұрын
Hello, thank you! Do you have an idea how i can implement to this feature to a side scroller? This logic turns the character the wrong side when it is right of the target .
@Zero_hk
@Zero_hk 3 жыл бұрын
How could I stop the target after killing the targeted enemy?
@Beardgames
@Beardgames 3 жыл бұрын
From your AI death blueprint simply clear your locked on target :)
@bibilicious
@bibilicious 3 жыл бұрын
How would you go around making a multi target system lock on? I made a very similar set up (except using line traces) in C++ and it mostly works, with an additional Q/E to toggle through the targets. But there is some edge cases which actually makes it fairly difficult to code thoroughly, like handling when one of the enemy dies, choosing different target (based on distance is easy, but what about left to right?). Any pointers?
@Beardgames
@Beardgames 3 жыл бұрын
So you'd just use the exact same method but for the Q/E keys make sure the target locked is 'not equal' to the first target :)
@StrannyiQuark
@StrannyiQuark 3 жыл бұрын
Hello! Great tutorial, many thanks! Can you explain, why the radius (the distance between my Character and its Target) is always increaing, if I strafe? Can I fix that somehow - I want always keep this distance unless I press Forward/Backward while strafing
@Beardgames
@Beardgames 3 жыл бұрын
No problem at all 😊 so I've actually only tested this with AI so I haven't noticed the movement change, but I presume when locking onto a still target when you move left and right your character gets further away over time? Hmm if this is the problem the only thing I can think of is on your movement input for moving left/right (the movement input node). Add a condition if the target is locked, then if the target is locked add a very small forwards input on top of the left/right movement. I use this technique to fix a bug in one of my upcoming videos if you haven't figured it out by then that video should be able to help :)
@arankasih1162
@arankasih1162 2 жыл бұрын
HI beard games! u just earned yourself a subscribe! its a good tutorial btw, easy to do and not complicated at all. And i actually have an ide that i can't do myself, if you don't mind? so basically, it would be good if our player have a max distance of targeting, so when we go too far from target, our targeting is off and we can control our mouse again. Thank you so much! Much love from Indonesia
@Beardgames
@Beardgames 2 жыл бұрын
Hey Aran thanks for the sub brother I really appreciate you supporting the channel :) So what you can do is add a condition onto your tick which say "if Distance between self & locked on target greather than ... clear lock on". Just use the same functionality and the "Get Distance To" node. Good luck!
@Grimsikk
@Grimsikk 2 жыл бұрын
Is there a more optimized way to handle the camera control? I was under the impression that putting things on Event Tick was bad practice. I'm looking to make my game as optimized as possible.
@aleca8910
@aleca8910 2 жыл бұрын
It's not a bad practice but it's recommended to use it only if necessary. In this case there's no other options. If you don't do the trace every frame your camera will start stuttering and you don't want that. Lock on target is something you must do every frame.
@blenderzone5446
@blenderzone5446 3 жыл бұрын
like it! thanks for sharing!
@Beardgames
@Beardgames 3 жыл бұрын
Thanks Metal :)
@blenderzone5446
@blenderzone5446 3 жыл бұрын
my pleasure!
@Pontos420
@Pontos420 3 жыл бұрын
How can I make the shpere spawned from the sphere trace for objects invisible? As even if I spawn it only for "one Frame" I can still see a red line poping up for a moment.
@dodossssssssss
@dodossssssssss 3 жыл бұрын
set draw debug type to none
@ION1234ASDASD
@ION1234ASDASD 3 жыл бұрын
can you make the player return to normal state after you release tab with a simple node? my char doesnt move normally, he stays in a strafe state, sory for my bad english, (i didnt do the animation blueprint part)
@sonapaiaca6902
@sonapaiaca6902 3 жыл бұрын
can you send me the link for the nodes? The link doesn't work
@Beardgames
@Beardgames 3 жыл бұрын
Hmm it seems that the link broke with the new update of the website. Will have to look into this a bit later for you Sona sorry! You can just re-produce the nodes if you want :)
@sonapaiaca6902
@sonapaiaca6902 3 жыл бұрын
@@Beardgames I have found the nodes, thx anyway and great work with the tutorial ^^
@FerUrdanetaDev
@FerUrdanetaDev 3 жыл бұрын
hey bro! the blueprint nodes are broken :c
@Beardgames
@Beardgames 3 жыл бұрын
Hey Fernando sorry to hear you're having issues man! What do you mean by the nodes are broken?
@FerUrdanetaDev
@FerUrdanetaDev 3 жыл бұрын
@@Beardgames with the link
@thentsc
@thentsc 3 жыл бұрын
@@Beardgames Yeah your link to blueprintue is dead
@Beardgames
@Beardgames 3 жыл бұрын
@@thentsc oh damn sorry guys they changed the website. Will try get on this ASAP :)
@armeddreams9141
@armeddreams9141 3 жыл бұрын
Whenever I lock onto an enemy or other physicsActor, it kinda locks onto their like, feet. So if I get within touching distance, my camera kinda looks 80 degrees down. Is there a way to make it eye-level, or atleast control the up-down angle of the view?
@Beardgames
@Beardgames 3 жыл бұрын
10:15 my friend :)
@Blonder_Studio
@Blonder_Studio 2 жыл бұрын
how can i make it so that if i move to either left or right while being locked on my character would be on the side of my screen?
@Blonder_Studio
@Blonder_Studio 2 жыл бұрын
nvm figured it out
@mmk6921
@mmk6921 3 жыл бұрын
1:56 Hi I Just made the TargetLocked variable, but when i tried to connect it to Pawn Owner on the Event Graph, the variable is not showing. :(
@gigs510muzik
@gigs510muzik 3 жыл бұрын
Same
@brunosemerek
@brunosemerek 3 жыл бұрын
Be sure that You have compiled Your player character blueprint. Your targetLocked variable should be created there. Then go to event graph of your animation blueprint and from cast to go get targetLocked. then promote it to variable. You will be using this new variable as targetLocked for animation blueprint.
@socialrecluse5227
@socialrecluse5227 3 жыл бұрын
When Locked onto a target and it gets destroyed I get an error. how would I implement a way to turn off the lock on when actor is destroyed?
@socialrecluse5227
@socialrecluse5227 3 жыл бұрын
Found solution in your other videos will leave this comment up incase others find same problem :) kzbin.info/www/bejne/pai9q2Ccm7qtqcU&ab_channel=Beardgames (13:30)
@3rosione
@3rosione 3 жыл бұрын
when i press tab my character doesn't do the strafing blendspace animations :(
@ImpeGa123
@ImpeGa123 3 жыл бұрын
Remember to set controller rotation yaw to true ( I forgot that )
@notinuse9999-c3y
@notinuse9999-c3y 2 жыл бұрын
I cant attack anymore with this system, any fix?
@ggplayer1170
@ggplayer1170 3 жыл бұрын
Is there a way to make the character move independently from the camera?
@ggplayer1170
@ggplayer1170 3 жыл бұрын
Just had to delete "Use control rotation yaw" to get what I want :)
@skippyzk
@skippyzk 3 жыл бұрын
woah, copying blueprints from websites is awesome!
@Beardgames
@Beardgames 3 жыл бұрын
Hehe speeds things up a bit 😁 I try avoid it to make sure everyone learns the process but sometimes it speeds things up so much haha
@skippyzk
@skippyzk 3 жыл бұрын
@@Beardgames Well, you explained everything too, and it's just the math part. Thanks for the maths! I have short enemies and I keep attacking over their head, but camera is pointing down towards the enemy. So I need to use an anim offset?
@ty_teynium
@ty_teynium 3 жыл бұрын
Be sure to collapse all those nodes at 10:03 into a function for performance sake.
@Beardgames
@Beardgames 3 жыл бұрын
Nice shout, I've been trying to avoid functions on my tutorials to keep things simple but a function here would be great
@emptybruh
@emptybruh Жыл бұрын
can you do one for top down view
Unreal Engine 4 Tutorial - Attack Combo
8:56
Ryan Laley
Рет қаралды 38 М.
Unreal Engine 4 - Dealing & Taking Damage
12:33
Beardgames
Рет қаралды 20 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
How to Make a Enemy Target Lock System in Unreal Engine 5
8:12
Gorka Games
Рет қаралды 40 М.
Unreal Engine 4 - Blending Animations
5:26
Beardgames
Рет қаралды 69 М.
How to Make a Blocking State in Unreal Engine 5
11:28
Gorka Games
Рет қаралды 6 М.
Unreal Engine - Channel & Flexible Combat System Update
5:31
Beardgames
Рет қаралды 6 М.
Unreal Engine 4 - Picking Up & Swapping Weapon Tutorial
6:57
Beardgames
Рет қаралды 54 М.
3D AI Model Generation is Getting GOOD - UE5.4 Unreal Engine
12:25
How to add Camera Shake to your VFX in Unreal Engine 5
4:21
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН