member PathCheck(float X, float Y, float Z)
{
variable float Disper
variable float Yper
variable float Xper
variable float Xper1
variable float Yper1
variable int count=1
;echo "MY X is ${X} my Y IS ${Y} Storedx is ${StoredX} storedy is ${StoredY}"
if ${StoredX}==${X}&&${StoredY}==${Y}
{
;echo "SAME PATH"
return 1
}
if ${Math.Distance[${StoredX},${StoredY},${X},${Y}]}<5
{
;echo "ALMOST SAME PATH"
return 1
}
StoredX:Set[${X}]
StoredY:Set[${Y}]
do
{
count:Inc
}
while ${Navigator.OpenNavPath.Get[${Math.Calc[${count}+1]}](exists)}
Xper1:Set[${Navigator.OpenNavPath.Get[${count}].Location.X}]
Yper1:Set[${Navigator.OpenNavPath.Get[${count}].Location.Y}]
if ${Math.Distance[${X},${Y},${Xper1},${Yper1}]}<1
{
return 1
}
else
{
return 0
}
}