Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func _findNextCamp($posPlayer, $arrCampsX, $arrCampsY)
- Local $posCurrent
- Local $posShortest
- Local $iDistanceCurrent = 1
- Local $iDistanceShortest = 1
- For $i = 0 To UBound($arrCampsX) - 1
- $posCurrent = _buildPoint($arrCampsX[$i], $arrCampsY[$i])
- $iDistanceCurrent = _calculatePointDistance($posPlayer, $posCurrent)
- _tt("Current Distance: " &$iDistanceCurrent)
- Sleep(1000)
- If Int($iDistanceShortest) >= Int($iDistanceCurrent) Then
- $iDistanceShortest = $iDistanceCurrent
- $posShortest = $posCurrent
- _tt("Distance Updated")
- Sleep(1000)
- EndIf
- Next
- Return $posShortest
- EndFunc ;==>_findNextCamp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement