Descent_pilot was nice enough to whip up something of an AI patrol cog for part of LoG 02, but the detection bit doesn't work all that well. The player is supposed to skulk around without being noticed. My theory is that the two guards (mover and mover1) detect one another, but whatever it is, the Spotted message is called as soon as the pulse begins. At this point, however, the theory doesn't hold true, as the guards don't see me until I come out into the open... but this happens even if they're looking in the opposite direction.
Code:
Pulse: If(HasLOS(mover, GetLocalPlayerThing()) && ThingViewDot(mover, GetLocalPlayerThing()) < dotView) call spotted; If(HasLOS(mover1, GetLocalPlayerThing()) && ThingViewDot(mover1, GetLocalPlayerThing()) < dotView1) call spotted; Return;