Jump to content

Recommended Posts

Hi.  I'm trying to learn some mission scripting.  I'm currently trying to write a function that will update groups' routes dynamically, for things like a formation of ships or CAP over a moving carrier.  Please could someone confirm the following assumptions I've made based on testing and the docs:

 

1.  There is no way to access current tasks for a Controller, and therefore no way to update waypoint locations not stored in script.

2.  A sensible way (in terms of ease, precision, and resources) to create dynamic routes is to have three waypoints:  [1] current location, [2] predicted target position for one minute from now, [3] predicted target position for two minutes from now, with a waypoint WrappedAction at [2] that calls the function again ([3] being only included for smoother turns).

 

My current attempt at this produces a crash every time, with no scripting error in the log.  I know it's something silly that I've missed, but the CtD with nothing logged makes normal debugging harder.  I also have the following unsolved questions about mission tasks that may or may not be contributing to the problem:

 

3.  What is the reference point for waypoint ETA vales in LUA?

4.  Do ongoing tasks and options (e.g. RoE and CAP) need to be cancelled if not intended in the new mission task, or reapplied if they are?

5.  Does the group's current waypoint index need resetting after setting a new mission task?

 

Apologies that I can't answer these through testing, but I'm fed up with the long CtD cycle.

test.miz waypoints.lua

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...