Line of sight

That guard’s MOVEMENT is based on tiles, as is the whole level generation, but I want him to be able to see in front of him and to the side, thus a total of 180º (0 being to his left, then going by the front, then finishing at 180 to his right).

Opiate, I don’t understand what you said about putting “stuff” in a “different level”. I understand the for()… loop, it tests if the _x and _y coordinates of this line of sight intersects with James. I don’t think I’m gonna do a for loop on an enterframe event for every guard (even though thats basically what I did, which lagged like hell).

Thoriphes, I agree with doing a setInterval on the checks, thus reducing the “weight” of sight checks and, benefically, representing a “reaction time” to the guards.

Still, I need just a few specifications, perhaps it is I who does not understand/graps the concept fully enough…?