TEMPEST.114 Posted February 18, 2023 Posted February 18, 2023 (edited) I have an AI aircraft that has two waypoints. The first, it's high and fast. The second is generated in script for it to be at a specific place, altitude and speed. This means it will do some 'linear' transition between it's current alt, speed and position to the newly created waypoint. Somewhere in the backend, that's controlling all this, it creates an 'ETA' for that waypoint. However, I can't see any way from the scripting API to 'get' that ETA once the mission task has been set on the AI Aircraft giving it the new waypoint and telling it to go there. Am I incorrect? Is there a way to get the backend generated Waypoint ETA, so that I can show that to the players? Edited February 18, 2023 by Elphaba
Grimes Posted February 19, 2023 Posted February 19, 2023 If that waypoint is time locked then the AI will attempt to adjust their speed to reach that waypoint at the specified time. If they are speed locked then the ETA is a literal distance/speed for the assigned waypoint. The value in the editor ignores other factors like the time it takes to turn, climb, or built in tasks. For instance if you have a orbit task set to last for 5 minutes it doesn't add that 5 minutes to the ETA for the next waypoint. If it is time locked then the AI can only do so much if they are ahead of schedule, they will slow down as much as possible, but won't orbit/wait at that waypoint until the set time. They will continue on to the next waypoint and then follow the rules for that waypoint. Since you are assigning the task you know where it is, where the waypoint is, and how fast you told the AI to go there. As a result an estimated time of arrival can be calculated. Outside that, no there is no function to query when its going to get there. 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
TEMPEST.114 Posted February 20, 2023 Author Posted February 20, 2023 I was more thinking of this type of scenario: AI Aircraft Has 4 waypoints. WP1 takes off WP2 climbs to altitude WP3 runs at best cruise WP4 descends and does a patrol orbit or something. At any point, what I wanted was the up-to-date ETA for WP 4 So AFAIK, DCS works that out on the fly depending on wind and the distance between waypoints for the climb to altitude etc... So that is a living number and not something that can easily be calculated with S = D / T But if I understand you, there is no way to get that living ETA from the back end.
Recommended Posts