Help with AI
![Flayr](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
I encountered a problem so I created a new project just to find the solution, only including the behaviors relavent to my problem for simplicity. I created two actors Player and Enemy. Player can move around a level with the arrow keys and its x and y attributes are set to Game.PlayerX and Game.PlayerY. The enemy has a "Move" behavior that makes it always move forward at a rate of 15. It also has a "Rotate to Position" attribute set to the "PlayerX" and "PlayerY" attributes as the position and 20 as the speed. The Enemy does chase the Player but when I put more than one on the field they run into each other and tur into one blob of enemies. I need to know how to make them not run into each other but still chase the Player. Another important thing is making the enemies avoid obstacles (walls etc.) so they dont constantly bash into them and get stuck.
Thanks in advanced (assuming someone does help) for my game could not be completed without this solved.
-Flayr
Thanks in advanced (assuming someone does help) for my game could not be completed without this solved.
-Flayr
Comments
You could then put a 'collide' behaviour in your enemy and walls that says 'Collide with actors with tag 'obstacles'.
Try it. It should make sure that they stop being a big blob and can move 'around' walls and stuff to get to the player.
Might work.
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io