NonStoppingNow 0 Posted April 17, 2023 Posted April 17, 2023 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! Quote
NonStoppingNow 0 Posted April 18, 2023 Author Posted April 18, 2023 That function will return only the number of points, right? I needed the coordinates of such points. I can try, you know how to get the blip of the route to pass it as an argument to GET_GPS_BLIP_ROUTE_LENGTH? Quote
LMS 676 Posted April 19, 2023 Posted April 19, 2023 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 Quote
NonStoppingNow 0 Posted April 19, 2023 Author Posted April 19, 2023 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. Quote
LMS 676 Posted April 19, 2023 Posted April 19, 2023 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. Quote
NonStoppingNow 0 Posted April 19, 2023 Author Posted April 19, 2023 I see... That makes sense. Now I'm using _FIND_CLOSEST_GPS_POSITION and it seems to return the coordinates of the first point of the route. Let's see! Quote
LMS 676 Posted April 20, 2023 Posted April 20, 2023 Nice, I did not see that one. You can probably get it to work to find most/all points by looping over that function with different positions. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.