function AISMN_HungerDeath::OnEnter(%this, %obj)
{
   %object = GetThisObject(%obj);
   StopMoving(%obj);
   %object.playThread(0, "hungerdeath");
   
   // Remove all task dialog
   echo("!*!*!*  Character in HungerDeath::OnEnter");
   %count = ClientGroup.getCount();
   for(%i = 0; %i < %count; %i++) {
      %client = ClientGroup.getObject(%i);
      commandToClient(%client, 'DestroyAllTaskDlg', %client.getGhostID(%object));
   }
   
   // Reset any lost happiness
   RestoreLostHappinessFromHome(%obj);
   RestoreLostHappinessFromJob(%obj);
   RestoreLostHappinessFromDrunk(%obj);
   
   %obj.DisableMonitors();
   slgUnemployObject(GetThisObject(%obj));
   slgUnhouseObject(GetThisObject(%obj));
   slgUnhideObject(GetThisObject(%obj));
   GetThisObject(%obj).setTeam(0);
}

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

function AISMN_HungerDeath::Update(%this,%obj)
{
   %timePassed = TimeInNode(%obj);
   if(%timePassed > 5.0)
      ReturnValue(%obj,0);
   else
      ReturnValue(%obj,-1);
   return;
}