{
	saved_FirstTime[0]

	Init[ ()
	{
		if(saved_FirstTime=0)
		{
			saved_FirstTime=1;
			SetInvulnerable(true);
			SetNationality(3);
			GiveWeapon(60);

			if( not (GetID()="buddy4") )
			{
				TurnTo(Level.GetPlayer());
			}
			if(	(GetID()="buddy3") or
				(GetID()="buddy2") )
			{
				PlayAnimation(29); // wave come here
			}
			else
			{
				PlayAnimation(7); // stand idle
			}
		}
	}]

	AttackFace[ (who)
	{
		SetState_Idle();
		PlayAnimation(13);
		TurnTo( Level.GetEntity(who) );
	}]

	GoPatrol[ ()
	{
		StopTurnTo();

		SetWander(0);
		SetState_Patrol(0);
		SetAttackDistance( 15,10 );
		SetLineOfSight(1);
	}]

	GoPath[ (path, mode, post)
	{
		switch( mode )
		{
			case 0
			{
				SetRunning();
				PlayAnimation(0);
			}
			case 1
			{
				SetWalking();
				PlayAnimation(1);
			}
		}

		FollowPath( path, 0 );
		switch( post )
		{
			case 0{ FollowPathCallback(127, "Delay", 0, 10); }
		}
	}]

	DelayReached[ (dy)
	{
		if( dy=10 )
		{
			GoPatrol();
		}
	}]
}