View Single Post
Old 23.04.2006, 14:54   #19
Xelat
Архивный участник
 
Join Date: Apr 2006
Posts: 70
Default Re: [AI TUT] aggro mobs: changing aggro logic

Quote:
Originally Posted by humordwarf
Code:
EventHandler SEE_CREATURE(creature) {
    if (creature.karma > 0) {
        AddAttackDesire(creature, 0, 1500);
    }
}
// 1 functions called (1+0)
Look at this
Code:
EventHandler SEE_CREATURE(creature) { 
    if (creature.karma > 0) { 
      if (creature.karma > 1000) AddAttackDesire(creature, 1, 1500); 
      else AddAttackDesire(creature, 0, 1500);
    } 
}
Xelat is offline