// v2.0.0 -
//::////////////////////////////////////////////////////////////////////////////
//:: FileName:  hark_kcs_camp
//::////////////////////////////////////////////////////////////////////////////
/*
   Have the henchman join you at the campfire. A campfire must be valid and
  within 15 meters. Also the henchman and campfire must be in the same area for
  obvious reasons. If you need to break out of camping early any of the radial
  commands will clear the henchman's state.
*/
//::////////////////////////////////////////////////////////////////////////////
#include "hark_i0_generic"
//::////////////////////////////////////////////////////////////////////////////
void main()
{
  object oCamp = GetNearestObjectByTag("hc_campfire");
  if (GetIsObjectValid(oCamp) && GetDistanceToObject(oCamp) <= 15.0 &&
      GetArea(oCamp) == GetArea(OBJECT_SELF))
    {
     ClearActions(CLEAR_KCS_CAMP_Main);
     SetAssociateState(NW_ASC_IS_BUSY);
     ActionMoveToObject(oCamp, FALSE, 1.5);
     ActionDoCommand(SetFacingPoint(GetPosition(oCamp)));
     ActionPlayAnimation(ANIMATION_LOOPING_SIT_CROSS, 1.0, 120.0);
     DelayCommand(120.0, SetAssociateState(NW_ASC_IS_BUSY, FALSE));
    }
  else
    { SpeakString(KCS_CAMP); }
}
//::////////////////////////////////////////////////////////////////////////////
