HoS_PRC8/_mod/_module/nss/carrion_percep.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

17 lines
704 B
Plaintext

///////////////////////////////////////////////////////////////////////////
// Real Time Strategy - NWN - OnPerception modified event for units
//========================================================================
// By Deva Bryson Winblood. 03/10/2003
///////////////////////////////////////////////////////////////////////////
void main()
{
object oMe=OBJECT_SELF;
object oEnemy=GetNearestCreature(CREATURE_TYPE_PERCEPTION,PERCEPTION_SEEN,oMe,1,CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,CREATURE_TYPE_IS_ALIVE,TRUE);
if (oEnemy!=OBJECT_INVALID)
{ // run
AssignCommand(oMe,ClearAllActions(TRUE));
AssignCommand(oMe,ActionMoveAwayFromObject(oEnemy,TRUE));
} // run
}