Planeshift
|
Whenever an NPC is attacked by a grouop, this perception is passed to the attacked npc. More...
#include <perceptions.h>
Public Member Functions | |
virtual void | ExecutePerception (NPC *npc, float weight) |
All preconditions has been checked, now excecute the perception. | |
GroupAttackPerception (const char *n, csArray< gemNPCObject * > &ents, csArray< int > &slots) | |
virtual Perception * | MakeCopy () |
Make a copy of this perception. | |
Protected Attributes | |
csWeakRef< gemNPCObject > | attacker |
csArray< gemNPCObject * > | attacker_ents |
csArray< int > | bestSkillSlots |
Whenever an NPC is attacked by a grouop, this perception is passed to the attacked npc.
The npc should use this to build an initial hate list for the player group. If the designer wants to cheat, he can start attacking back on this event instead of on first damage, and save a few seconds in response time.
Definition at line 338 of file perceptions.h.
GroupAttackPerception::GroupAttackPerception | ( | const char * | n, |
csArray< gemNPCObject * > & | ents, | ||
csArray< int > & | slots | ||
) | [inline] |
Definition at line 346 of file perceptions.h.
All preconditions has been checked, now excecute the perception.
npc | The target of the percpetion. |
weight | Indicate how much the HateList of the npc should be changed. Value comes from the reaction. |
Reimplemented from Perception.
virtual Perception* GroupAttackPerception::MakeCopy | ( | ) | [virtual] |
csWeakRef<gemNPCObject> GroupAttackPerception::attacker [protected] |
Definition at line 341 of file perceptions.h.
csArray<gemNPCObject*> GroupAttackPerception::attacker_ents [protected] |
Definition at line 342 of file perceptions.h.
csArray<int> GroupAttackPerception::bestSkillSlots [protected] |
Definition at line 343 of file perceptions.h.