This video is the best video I found on enemy ai. Every other one has some reference to something they made in a different video. But this one is can be followed no matter how your game is. This tutorial makes simple enemy ai that can have many other things added to it. I'd like to see a more advanced version at a different date but it doesn't matter that much. Thanks for making this video. It has saved me from redoing my script several more times. 👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
@BenjaminGameDesign11 ай бұрын
Thanks! This means a lot.
@devmarboy4045 Жыл бұрын
idk why comments say volume is low I can hear just fine. thanks for the tutorial btw
@BenjaminGameDesign Жыл бұрын
I thought so too when editing it, but if they say it's too low, I'll raise it a bit. Thanks for the comment!
@supjay394510 ай бұрын
I thought it was ok on my ear buds. Im usually the one complaining. It could use a few notches turned up I guess.
@savmass6 ай бұрын
Great tutorial. Thank you for being so thorough. I tried to replicate this in 3D but I noticed that even though I had other collisionshape like walls, the enemy seems to clip through them. I'm sure the same would happen if it's 2D as well since it is using the same principles.
@legosanimations451711 ай бұрын
Awesome video mate, one thing tho, it must be on my end, but when I interact with the enemy's collision shape (the big circle) with my player it just pushes it away. Advice would be greatly appreciated!
@BenjaminGameDesign11 ай бұрын
As in, it gets pushed away from it because it collided or because it is running away?
@legosanimations451711 ай бұрын
@@BenjaminGameDesign When i enter the collision circle, it doest chase, it just moves away or closer in one direction
@legosanimations451711 ай бұрын
depending on which side I enter
@BenjaminGameDesign11 ай бұрын
Hmm, in my video titled I PARTICIPATED IN A GAME JAM!!! In the description, there is a link to my Twitter. If you could send me a video on there, that would be great.
@legosanimations451711 ай бұрын
@@BenjaminGameDesign I don't use twitter myself, do you happen to have a discord? Or should I make an account there?
@istemann Жыл бұрын
The volume is low, but thanks for the guide!
@BenjaminGameDesign Жыл бұрын
Sorry about the audio, but I'm glad you liked the guide.
@SaucinStudio2 ай бұрын
wow fantastic!!!!! it worked exactly as it did in your video a million thanks!!!
@PringlesA Жыл бұрын
Awesome video, man! I can hear you well, unlike some comments might suggest. I do have a question, is there any way to stop the enemy from "floating" and going through ground to catch you?
@BenjaminGameDesign Жыл бұрын
I'm unsure what you mean. If you are having problems with collisions, you should look at the collision layers and masks.
@PringlesA Жыл бұрын
@BenjaminGameDesign I think I fixed it, actually, but I really appreciate your incredibly fast response!
@BenjaminGameDesign Жыл бұрын
Do you mind commenting how incase other people have the same issue.
@bulbachu13278 ай бұрын
Hi! I’m having the same problem. How did you fix it?
@minx-fractor8 ай бұрын
@@PringlesA how did u fix pls tell us
@bodie538313 күн бұрын
my enemy freezes in random places, even areas without collision. like my enemy follows the player until it randomly stops, almost like there is invisible barrier preventing it from moving closer
@SethRuh7 ай бұрын
i deeply appreciate this video my man
@BrandonTheOverthinker5 ай бұрын
I spent over an hour trying to sort out an enemy ai from a tutorial that wasn't even how I wanted it to be. This worked first try and suits my needs so thank you.
@callisto-games8 ай бұрын
How do I add wall collisions to the enemy so it doesn't just fly through the walls?
@space.d.8 ай бұрын
project settings - 2d physics layers name the layers depending on the entities or object of collision - layer 1: player, layer 2: enemy, layer 3: walls etc. - click inside the enemy scene -> characterbody2d if chosen, go to inspector -> collision -> click the layers as you need -> in that case layer 2 = enemy (hover over it and you can see it, as you named it in the settings accordingly) -> mask equals what it can and cannot collide with - choose mask 3 as its named walls now and if the enemy and the walls have a collision2d node attached as child, the enemy will collide with the walls and should not travel through infinity :)
@lay2BH4 ай бұрын
Could you help with having the enemy call the function Flip() if the player's direction is equal to -1? Thank you for any help or tips.
@Acey4k5 ай бұрын
how would i change this up if it was for a platformer game? It chases me into the air on a platformer game
@hsjwvs Жыл бұрын
please make more videos like these
@antii44758 ай бұрын
in case of fellow idiots, for enemy collision add the move and slide to their code.
@minx-fractor8 ай бұрын
the enemy is cliiping through floor what should I do?
@bleunny5 ай бұрын
@@minx-fractor you should do colliders search for Other vidéos 👌🏾
@VanshSingh-p2c9 ай бұрын
Bro it does not works for me please help
@R2robot4 күн бұрын
Super low volume.. Even with my ear buds in, I have to turn it up to 8 or 9/10.. and then get blasted by system notifications. Ouch!
@ghostgaimin475 ай бұрын
idk if its my bad pc or if they changed something in the last update but i cant find the DetectionArea node, is there any other way of doing the player detection part?
@danielkelly-hj1wm5 ай бұрын
Just called Area2D but I think he renamed it
@ghostgaimin475 ай бұрын
@@danielkelly-hj1wm already found out lol, thx anyways
@bleunny10 ай бұрын
Man for me the ennemy is trying to go away from me bro 😢 why ??
@starbind10 ай бұрын
mine too, did u fix it?
@McnoogyWoogy_III9 ай бұрын
have u fixed it my man? I am in dire need of assistance
@bleunny9 ай бұрын
@@McnoogyWoogy_III no i did not bro 😟 i need some support man
@McnoogyWoogy_III9 ай бұрын
@@bleunny noooo 😭
@MrGre3do9 ай бұрын
You must've messed up some + and - somewhere
@necrotafeio2 ай бұрын
not working, enemy wont move
@OceaniaAirline10 күн бұрын
Mine flys away from me :/
@walterallred11 ай бұрын
I was able to follow the tutorial with the audio muted so not sur why everyone tripping on the audio. I got this working but I'm not a huge fan of the enemy motion. If it's following me and I stop it gradually gets slower and slower until it's directly on top of the player.
@BenjaminGameDesign11 ай бұрын
That's a weird issue. I never encountered this. If you manage to fix this, please comment how so others can see.
@user-rr1ly3 ай бұрын
same did you fix it?
@Ghostpants4465 ай бұрын
Thank you. this was good
@revoxhr9 ай бұрын
How add physical to enemy
@kholikmaulana52911 ай бұрын
Thank You 😊
@TheFrostWalker8 ай бұрын
THANKS ! god bless you!
@muhammadnuralhafiz Жыл бұрын
Oh yes
@kholikmaulana52911 ай бұрын
Thank You
@612Luck10 ай бұрын
Nice!
@shaunmcmanus2418 Жыл бұрын
First
@HalVerArt7 ай бұрын
heya I hope u still answer to the comments but I cant seem to make my enemy move at all, even though I followed everything specified in the video... could I contact you via discord?