już ci dokładniej opiszę sytuację.
zrobiłem kolor nazwy npc w zależności od stosunku (attitude)  i zawsze jeżeli npc jest w trybie walki (czyt. zs_attack) to kolor jego nazwy zapal się na czerwono. po walce kolor wraca do właściwego.
oba te warunki nie pomogą,tu musi być cos takiego jak hero nie jest atakującym, ani broniącym się, a może być widzem. dzięki, że próbowałeś!
Post połączony: 2014-03-30, 08:54
chodziło mi o coś takiego, na razie sprawdzam ten tropfunc int C_NpcIsAttacker(var C_NPC self)
{
   PrintDebugNpc      (PD_ZS_DETAIL, "C_NpcIsAttacker" );
   if   (self.aivar[AIV_LASTTARGET] == Hlp_GetInstanceID(hero))
   {
   //||   (guard.npctype == NPCTYPE_MINE_GUARD)
      if (Npc_GetNextTarget(self))         // Vorsicht: löscht 'other', wenn kein neues Ziel gefunden
      {
         if   (Hlp_IsValidNpc(hero))
   { 
         PrintDebugNpc(PD_ZS_DETAIL,   "...true");
         return       TRUE;
      };
   };
   
   PrintDebugNpc      (PD_ZS_DETAIL,   "...false");
   return            FALSE;
};
};
Post połączony: 2014-03-30, 18:33
udało mi się to rozwiązać, wystarczył jeden warunek w zs_attack Npc_PerceiveAll            (self);      // nötig, da Npc_GetNextTarget() auf der Liste der zuletzt Wahrgenommenen VOBs beruht
      self.aivar[AIV_LASTTARGET] = Hlp_GetInstanceID(other);
      if (Npc_GetNextTarget(self))         // Vorsicht: löscht 'other', wenn kein neues Ziel gefunden
      {
         if   (Hlp_IsValidNpc(other)
         &&   !C_NpcIsDown(other)
         &&   Npc_CanSeeNpcFreeLOS(self,other)
         &&   !C_OtherIsToleratedEnemy(self,other))   // sonst ignorierte Feinde nicht in die Auswahl mit aufnehmen
         && !Npc_IsPlayer(other)//edit by pawbuj