View Single Post
Old 06-15-2012, 08:52 AM   #200
Senior Member
JCarter426's Avatar
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,668
Originally Posted by Fallen Guardian View Post
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.

Last edited by JCarter426; 06-16-2012 at 12:02 AM.
JCarter426 is offline   you may: quote & reply,