Hi all!
Below is a link to a demo of a combat game that utilizes a simple combat AI from combining a state machine with move to behavior and distance. I have also created a video tutorial going through the creation of it that is linked below as well. Lastly, on the demo page, you can find the project file to download as well if you would like to tinker with or incorporate into your own games. I had to remove the art in the downloadable file so you will see some great squares fighting each other if you download and open it :)
Cheers and feel free to provide some commentary on how to implement this more effectively if you would like or any other commentary.
Demo + Project File:
foozlecc.itch.io/simple-combat-ai-construct-3-tutorial
(use full screen for best experience, arrow keys to move your character and spacebar to attack)
Video Tutorial (subscribe if you enjoy, 3 subscribers and counting woohoo lol... gotta do something to have some fun during covid)
FoozleCC