
function AISMN_Reaction_AttackSeenEnemy::OnEnter(%this,%obj)
{
   %object = GetThisObject(%obj);
	%object.playVocal("SBA");
   %attacker = %obj.getThreatEnemy();
   if (%attacker && IsAttackable(%attacker) &&
      !%obj.isAttacking() && IsAttackable(%object))
   {
      %obj.performAction("attack", %attacker);
   }
   return;
}

function AISMN_Reaction_AttackSeenEnemy::OnExit(%this,%obj)
{
   return;
}

//EXIT 0: No longer shooting
function AISMN_Reaction_AttackSeenEnemy::Update(%this, %data)
{
   if (%data.isAttacking() == false)
   {
      ReturnValue(%data, 0);
   }
   else
   {
      ReturnValue(%data, -1);
   }
}
