Is the second parameter of ExecuteScript() always OBJECT_SELF?
What does the GetLastPerceived() function do?
And I get an error when I'm compiling the first script. The error has something to do with the compiler not being able to identify KOTOR_DEFAULT_EVENT_ON_HEARTBEAT. Also, why have you not used KOTOR_DEFAULT_EVENT_ON_HEARTBEAT parameter in the if condition?
Thanks for your reply