Thanks for playing our game!
Don't mind the AI. It basically picks a target, faces its direction and shoots. If it hits or not, is up to RNJesus :) It isn't the cleanest solution, sure...
But on the flipside, it allows the AI to shoot itself :)