Hey guys, I have an enemy ai question.
If(hero is between goblins x pos and visual pos(where he can't see))
Then fire
If not then idle
I want it so the enemy fires when the hero comes close to the goblin.
now i can do this
if(hero.hitTestPoint(goblin,x + 100, goblin.y, true)
//fire
But then if the player is in the middle and not touching the x pos, when I have failed. What do you guys reckon, any tips :D?!