-- Social -- Discord: the discord server has been shut down, sorry! Twitter: / garbaj2 -- Links -- Github: github.com/GarbajYT -- About -- In part 2 of our Godot enemy AI series, we'll be learning how to make our enemies aim and shoot.
The deeper I get into Godot, the more intuitive I learn everything actually truly is. State machines are always daunting for me to setup but not only is your tutorial amazing, but I’m realizing how simple it is to pick it all up in Godot. Thanks for these!
I would love to see these tutorials continue, the way you showcase and explain things is very helpful for a beginner, I've found that other tutorials don't really explain things as well as you do.
I also thought of making 2 states with ur tutorial with 2 range detectors for AI ADS (accurate) and HIP (with spread) if the player is very near the AI.
Love your tutorials but at 7:45 deg2rad actually coverts degrees to radians (hence "deg" to "rad") which mathematically is a much better option for the engine.
Will you cover how to have an enemy navigate an environment? I've been wanted to implement moving enemies in a game, but I'm at a complete loss as to how to have them patrol areas and chase the player around obstructions
I've been messing around with pathfinding but I haven't got it working yet. Here's a tutorial though I haven't gotten it to work yet ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_urHlep2P84.html
Tnx a lot for all these valuable tips. I need a code for 2d game * If we touch the enemy sprite with our finger (playing in mobile) or on mouse click, then it will vanish (with animation). * Enemy sprites appearing randomly in different places. * Total count showing in the top right screen. Tnx
For me the script worked fine but I added a bhoppping script to my character but when I bhop around the enemy and stop the enemy is shooting to the side of the player and missing
Hey man, when i wrote the aiming script, i tested the game, and the enemy aimed... but at the opposite direction! XD how can i solve this problem? english isn't my first language so sorry in advance. Great video as always. Thanks
More about AI please! Maybe a behaviour tree style IA? I found this gdscript.com/godot-behaviour-tree but i'm still unable to connect the states with my character, getting a lot of errors :(
There will be more, but there are other videos I'd like to make as well. Luckily if you've watched all 3 of my AI videos you should be able to make most things with a little bit of creativity
hi, ik this is 2 years later and u prob won't respond, but can anyone tell me why it's not working for me? I tested it and the exact part that isn't working is the : if raycast.is_colliding(): any idea of why anyone?
When I try and run this in my game, and I enter into the enemy's range, they begin spazzing out. D: I can't figure out what's causing this, please help.
Yes it's very easy. Watch my projectile weapon tutorial to get some ideas on how to do it ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-IDsoEAj5xG0.html
@@garbaj I got the enemy to shoot projectiles, but I am having trouble making the enemy actually look at the player. I've tried so, so many things and now my code is a whole mess. I'm sure there is a really quick way to do it, but nothing seems to work.
i swear the more tutorials of yours i watch the mor I get trust issues with people, like pretty much every single tutorial of yours resulted in errors in glitches
after a day i realized that this method is flawed to begin with, using areas for player detection leads to an incredible loss of performance, with this method, 20 enemies in a scene and the game lags incredibly barely reaching 10 fps, but I've tested projects with different player detection and they can run 100 enemies at minimum 20 fps.