Jump to content

Recommended Posts

Posted

Hi DCS scripting Gurus

I would be interested to "inject" a path to a ground unit that would move from A to B.

I found that the DCS findPathOnRoads can return a table with the path from A to B.

But what is the scripting function to assign this path to a ground unit ? Can't find it and there is no related function that would do the job in the wiki...

Thanks

Posted

Use the mission task.

 

Worth noting that you can just create waypoints with just waypoint A and B, you don't need to make one for the whole path returned via findPathOnRoads. That function is more useful to know the exact path that is taken. Distance from A to B as the crow flies might be 10km, but the on road path might be considerably more. You can use that information to figure out how long it might take the AI to reach their destination. Maybe try to choose alternative routes if the shortest route generated forces the AI to go someplace you don't want them to be.

 

A big problem with that function is that it is "expensive" in terms of how long it can take to run and how much data is returned. If the distance is large enough there can be several thousand points returned for their path.

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

  • Recently Browsing   0 members

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