I'm doing something wrong, events won't fire, please help! :firehead
 for every user defined event I put the default script in the creature template so that k_ai_master is executed and the event is fired - should be - then i defined my event handlers and put the script in the template, did I miss something?
 
 
 #include "k_inc_generic"
 #include "k_inc_debug"
 #include "k_inc_utility"
 
 void main(){
 int nUser = GetUserDefinedEventNumber();
 
 if(nUser == 1001) //HEARTBEAT
 {
 bla bla bla…
 }else if(nUser == 1006) // DAMAGED
 {
 bla bla bla…
 }else if(nUser == 1007) // DEATH
 {
 bla bla bla…
 }else if(nUser == 1011) //DIALOGUE END
 {
 bla bla bla…
 }else if(nUser == HOSTILE_RETREAT)
 {
 UT_ReturnToBase();
 }
 }
  
 
  
  
    What did you used as the OnSpawn scipt? You have to set the proper flags in the OnSpawn script.
  Check k_def_spawn01.nss and uncomment the flags you need then save under a custon name (edit your .utc file accordingly) as explained in this tutorial: 
http://nwn.bioware.com/forums/viewcodepost.html?post=762559) (it's for nwn but it's valid for Kotor)
  
 
  
  
    Yep I forgot to turn on the flags -_-
 :) thanks!