marcost Posted July 15, 2022 Posted July 15, 2022 (edited) hi, Is there any way to get the number of the WP that a unit/group is heading for? I can access the list of a group's waypoints with mist.getGroupRoute but I can't see a function to return which WP number the group is currently heading for. Getting the nearest waypoint is straightforward, but the nearest WP isn't necessarily the next one. I could use a counter to +1 every time a waypoint is passed close to, but again that relies on the group getting close to a WP which a player may not do. Thanks, M Edited July 15, 2022 by marcost W10 64 I7 4790k o/c to 4.6Ghz Asus Maximus Ranger VII 24gb DDR3 RAM @ 2133 Asus Strix 1080ti OC ASUS ROG G-sync 27" monitor DCS on M2 drive Samsung 960 Pro MS FFB2 with F-16 grip CH pro throttle MFG Crosswind pedals TrackIR 5 3 x Bodnar button & axis boxes
PravusJSB Posted July 15, 2022 Posted July 15, 2022 (edited) I don't think there is an easy answer, and I think you're half way there. (side note, there is a waypoint 'call out' feature but I am neither sure what it does or if it would help failing that...), I would get a position, get the pre-defined waypoints and calculate the closest (as you have said above), then I would take the position of the next WP, the Bearing and Range from your objects reference point, then compare it to the vector of your object to logically determine if he is on course to it. Checking more than once will increase the certainty. Edited July 15, 2022 by PravusJSB Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans. Discord: PravusJSB#9484 twitch.tv/pravusjsb https://www.patreon.com/XSAF https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu Work with me on Fiverr: https://www.fiverr.com/pravusjsb
marcost Posted July 17, 2022 Author Posted July 17, 2022 Ok thank you, I will try that W10 64 I7 4790k o/c to 4.6Ghz Asus Maximus Ranger VII 24gb DDR3 RAM @ 2133 Asus Strix 1080ti OC ASUS ROG G-sync 27" monitor DCS on M2 drive Samsung 960 Pro MS FFB2 with F-16 grip CH pro throttle MFG Crosswind pedals TrackIR 5 3 x Bodnar button & axis boxes
Recommended Posts