function AISMN_PlayDefeatedSound::OnEnter(%this, %obj)
{
   //%obj.disableToolActions();
   
   %object = GetThisObject(%obj);
   %client = ClientGroup.getObject(0);
   %ghostID = %client.getGhostId(%object);
   commandToClient(%client, 'RemoveFromGroupSelection', %ghostID);
   
   // this is done when the character is removed from the game
   /*
   // only send a destroy message if the character that is dying is
   // not the hero (who doesn't really die)
   %character = slgQueryInterface(%object, $CID_CHARACTER);
   if (isObject(%character) == true && %character.isHero() == false)
   {
      slgSendObjDestroyMsgLocal(%object);
   }
   */
   
   GetThisObject(%obj).playVocal("DIE");
}

function AISMN_PlayDefeatedSound::OnExit(%this, %obj)
{
}

function AISMN_PlayDefeatedSound::Update(%this, %obj)
{   
   ReturnValue(%obj,0);
}
