Originally Posted by Fallen Guardian
Thanks JC. The reason I want the perception event is because this is a userdefined script for an NPC.
I still don't get what you want. I don't think there's a generic "check if NPC has seen something" function. I'm not sure if you can even check if a specific NPC has seen a specific object, unless it's a trap. Perhaps someone else can clarify; I tend to stay away from this area, I prefer predictable scripting, like cutscenes.
EDIT: I looked into it more out of curiosity and it appears to have confirmed my suspicions. Here's a bit from Atton's user defined events:
object oSeen = GetLastPerceived();
if(GetIsPC(oSeen) && GetLastPerceptionSeen())
That checks if the PC was the last object Atton saw, but it doesn't trigger anything on its own. You'd need to trigger the user defined event via the perception script (apparently it's called "OnNotice" in KOTOR Tool).
Just out of curiosity, why wouldn't the 3rd condition ever be met?
Because if it's less than 5 meters away then it's also less than 7 or 10 meters away, and those are checked first. I could recommend some changes, but I'd need more specifics; as I said I'm not quite sure what you're doing here.