I am working on my custom hud project and I would like to remove this distance value from the minimap overlay and get the distance reaming to a waypoint so i can use it in my html made hud.
From what I have found this is the scale form that is responsible for showing this value on the map “HIDE_SATNAV”.
Just to make everything clear I have used natives such as Vdist, CalculateTravelDistanceBetweenPoints etc. and none of them work. Please help me out with my issue
The scaleform that handles the sat nav is minimap, the scaleform method is HIDE_SATNAV/SHOW_SATNAV and SET_SATNAV_DIRECTION.
Here is an example of how you could remove both the arrow (direction) and the distance:
local minimapScaleform = nil
CreateThread(function()
minimapScaleform = RequestScaleformMovie('minimap')
-- Refreshes the minimap
SetRadarBigmapEnabled(true, false)
Wait(0)
SetRadarBigmapEnabled(false, false)
-- Removes the sat nav (direction and distance)
while true do
-- Direction (arrows)
BeginScaleformMovieMethod(minimapScaleform, 'SET_SATNAV_DIRECTION')
ScaleformMovieMethodAddParamInt(0)
EndScaleformMovieMethod()
-- Distance
BeginScaleformMovieMethod(minimapScaleform, 'HIDE_SATNAV')
EndScaleformMovieMethod()
Wait(0)
end
end)
Now, you don’t have to loop these, but they tend to be changed by the game whenever the player has a waypoint on their map etc.
Okay… well then I was mistaken. I believe that CalculateTravelDistanceBetweenPoints would be the best native for what I think you want to do. For long distances, you might need to force-load the path nodes to make the native work.
I don’t think it’s possible to get the variable from the hud as I think you want to do.