Converted for onmapsingleclick:
Call by:
OnMapSingleClick {_pos exec {showPolar.sqs}}
showPolar.sqs:
_player = player
_targetX = _this select 0
_targetY = _this select 1
_targetZ = _this select 2
_playerPos = getpos _player
_playerX =_playerPos select 0
_playerY = _playerPos select 1
_Xdiff = _TargetX - _playerX
_YDiff = _TargetY - _playerY
_Range = sqrt ((_Xdiff^2)+(_yDiff^2))
?(_Range == 0):goto "wait"
_Xfactor = (_Xdiff/_Range)
_Yfactor = (_YDiff/_Range)
_direction = acos _Yfactor
?(_Xfactor < 0):_direction = 360- _direction
_range = _range - (_range mod 10)
_Direction = _direction - (_direction mod 1)
_DirectionName = format ["%1 Degrees", _Direction]
_title = Format [" "+_DirectionName+", %1m", _Range]
titletext [_title, "PLAIN DOWN", .3]
or you can convert the titletext and the _title thing into a hint message