Jump to content

Get the number of points from the GPS route.


Recommended Posts

Hi, I'm trying to get the list of points (coordinates) from a GPS route.

I've been playing a bit with the map functions, but I'm a bit lost here. I don't want to generate a custom route by my own, my plan is to just set a waypoint during the game and then retrieve the points (vector3) of the generated route. Does anyone know how to do it or at least how to get close to that?

 

Thanks!

Link to comment
Share on other sites

That's my bad! Yes, it would only return the route length. You could perhaps try to get the natives right below that to work (0xEFC535C9FAF563B3 and 0x665B21666351CB37). They might be related to routes and at least the first one definitely returns a position. However, I cannot tell you what kind of position. Here is an example: https://github.com/stianhje/rdr3-decompiled-scripts.1232/blob/023e299cb6050ce07b5aad4147df58e304c0450f/script_rel/abigail21_outro.c#L1324

Link to comment
Share on other sites

Thanks for your help. I'm not sure if I have the skills to decode unnamed natives...

 

My final goal is to show on the screen the direction to the next point (closest point) of the route. For example, you select a waypoint in the map and a route is generated, then the idea is to get the indications as text (left, right, front and back) guiding you through the generated route. Kind of a compass or a very basic navigator...

My plan to do this was to get the coordinates of the first point of the route and then calculate the direction based on the location of the payer and camera position/rotation. Right now I can calculate the directions towards any given point, but now I'm missing how to obtain the coordinates of the route. Maybe there is another way to get that information using only the already named functions?

 

Also, I'm a bit confused about some concepts, for example, what is a 'custom route' or a 'waypoint recording'? Or how can I get the handle to the generated route? Maybe this can be interesting for the task.

 

Link to comment
Share on other sites

I am not sure if there is another way using named natives (or using natives to begin with). I am not sure what custom route refers to but my guess would be you could override it from a waypoint recording. Those recordings are done by R* to record predetermined paths that are then "played back" during gameplay. It allows them to make sure the AI is pretty much exactly where they need it to be at any given time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...