TiAm: Thanks for the advice. I'll look into moving the LOS command into the player. The behaviour I wanted to create was this:
1. On start monsters patrol the layout in a random pattern.
I did this by having the monsters face a random angle, and ricochet off layout edges in a different direction.
2. When shot, monsters chase player.
For this I set up an instance variable boolean on the monster which turns true when a bullet hits it. This causes the monster to change angle to face the player, and increase speed.
These are the behaviour rules I'm having problems with.
Bonesey: Thank you for your "for each" loop. It's very close to the behaviour I wanted to create, and it'll be very useful later. But I was trying to enable the player to approach monsters without being seen. The reason for these is I was aiming to make the monsters to move faster than the player when they spot him and are shot, to encourage "sneak-up-and-shoot-em-up" gameplay.
3. When player crosses a LOS arc in front of monster, monster "sees" player and chases him.
By "LOS" I mean an area in front of the monster: not necessarily the LOS function itself.
4. When player moves out of the LOS arc, monster stops chases returns to normal behaviour. (Allows player to evade.)
5. When player approaches monster from behind, monster ignores player.