NEW ONE method MoveToCurrentPOI() { This.POIStr:Set[${POI.Str}] ;echo ${nmcount} if ${This.IsMovingToCurrentPOI} { ;------------------------------------------ ;Generate a path to POI ;------------------------------------------ This:MoveToLoc[${POI.X},${POI.Y},${POI.Z}] ;--------------------------------------------------------------------- ;If we already generated a path but are not moving generate a new one ;--------------------------------------------------------------------- nmcount:Inc ;echo ${nmcount} if ${nmcount} == 250 { ;echo UNSTUCK ME nmcount:Set[0] move forward 2000 This:MoveToLoc2[${POI.X},${POI.Y},${POI.Z}] } } else { ;------------------------------------------ ;We are moving reset our counter for check ;------------------------------------------ nmcount:Set[0] } } OLD ONE method MoveToCurrentPOI() { This.POIStr:Set[${POI.Str}] if ${This.IsMovingToCurrentPOI} { nmcount:Inc if ${nmcount} == 100 { echo UNSTUCK ME move forward 2000 This:MoveToLoc2[${POI.X},${POI.Y},${POI.Z}] } } else { ;echo MOVING TO POI nmcount:Set[0] This:MoveToLoc[${POI.X},${POI.Y},${POI.Z}] } }