function AISMN_Idle_Basic::OnEnter(%this,%obj)
{
   if(RandomNumber(1,100) > %obj.getDataBlock().idleChance)
      return;
      
   %numIdles = GetThisObject(%obj).getDatablock().numIdles;
   %anim = "idle0"@RandomNumber(0,%numIdles);
   GetThisObject(%obj).playThread( 0, %anim);
   return;
}

function AISMN_Idle_Basic::OnExit(%this,%obj)
{
   GetThisObject(%obj).playThread( 0, "root");
   return;
}

function AISMN_Idle_Basic::Update(%this,%obj)
{   
   ReturnValue(%obj,-1);
   return;
}
