I'm trying to discourage players from outrunning their pack animals and would like to do a GetDistanceBetween check when the PC exits an area. If they are > 30.0 then it drops their henchman (pack animal) and floats text that they have lost their animal.
They can then go back to the previous area and tame it again.
Problem is when I add this onExit
object oExiting = GetExitingObject();
object oHench = GetHenchman(oExiting);
if (GetDistanceBetween(oHench, oExiting) > 30.0)//Checks distance, if too far, will not follow
{
AssignCommand(oHench, ClearAllActions());
RemoveHenchman(oExiting, oHench);
DelayCommand(4.5, FloatingTextStringOnCreature("<cÃÃ >You have lost your pack animal</c>", oExiting));
}
my conditions always fire as if I am always 30.0 distance away even if the animal is right behind me, so I lose the animal. I fear the check isn't going off until I transition and it's true regardless of distance.
Any suggestions would be great!