Jump to content

Lua scripting : insert waypoint in flight plan


CougarFFW04

Recommended Posts

Hi DCS scripting Gurus,

Let's suppose that I have a ME build-in flight plan compose of WPT0 (take-off), WPT1 (Push point) and WPT2 (landing) assigned to a AI flight.

 

I would like to know if there is an easy way to insert a intermediate Waypoint in between 2 existing waypoints (for exemple between WPT1 and WPT2) without having to rebuild the all flight plan or respawning the flight?

 

If there was any functions that would :

I) - read a Group's flight plan to a table

II) - insert a table as a Group's flight plan

III) then in principle that would be just a matter of inserting a new entry in the table and inject the new table in place of the original flight plan...

 

However I cannot find any DCS function that would do I) or II)

 

I think that the Mist buildWP(fixedWing) and goRoute function would do part of the job but I cant' find any function that would read a flight plan to a table...

 

Any idea ?

 

Thanks


Edited by CougarFFW04
Link to comment
Share on other sites

You have to parse the mission file to get a specific groups flight plan. If the group was dynamically spawned you can't access the flight plan unless you store that flight plan in a table.

 

This is how mist parses the mission table to find the route data. https://github.com/mrSkortch/MissionScriptingTools/blob/master/mist_4_3_74.lua#L5976

 

From there it is simple table manipulation to insert WP data into the table: http://lua-users.org/wiki/TablesTutorial

 

And of course reassigning via mission task.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Insert points or retask route

 

I was trying to make a mission where i could "copy" the route (waypoints) from a group unit (client) to another group units (clients also). I have over 10 squadrons in one mission, all using the same waypoints (in the way that i only need to set one group and the rest is automatic). I was trying with MIST but can't make it work. Is it possible with MOOSE?

Link to comment
Share on other sites

I was trying to make a mission where i could "copy" the route (waypoints) from a group unit (client) to another group units (clients also). I have over 10 squadrons in one mission, all using the same waypoints (in the way that i only need to set one group and the rest is automatic). I was trying with MIST but can't make it work. Is it possible with MOOSE?

 

If it is a client group it can't be done to my knowledge. I've tried it and it crashes DCS at least for an F15C. Perhaps with other airframes where you can add/remove waypoints in the cockpit it will work but I highly doubt it.

 

For AI groups, I do it all the time.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...