Jump to content

What are [spans] in regards to unit waypoints, routes and points? There is no information on the wiki about these.


Recommended Posts

Posted

I'm trying to use a Mission Editor placed group as a 'template' and in script duplicate it and change it's final waypoint depending on what's happening in the mission at the time. 

I'm struggling with knowing what x,y(z) positions to change - there is no documentation on this. Am I just changing the points? Or the [1] in the route table? what are the [2] x and y's in the route table? What the hell are 'spans'?

Any advice please, I'm stuck!

Posted

The mission task is more or less exactly whats in the mission file. https://wiki.hoggitworld.com/view/DCS_task_mission

So to change the route you need to change the x, y, and alt values nested within route.points[index]. With the index numbers counting up from 1 and whatever the highest number being the last waypoint. 

Spans don't matter at all and are only used by the mission editor. Specifically the spans identify the lines used to draw the route in the editor. If you have an on road route with just two waypoints then there would be 2 values within route.points and depending on the length of the route potentially thousands of spans. There aren't many entries remaining in the miz that are only used by the editor, but spans are the most obvious one. 

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

Posted
2 hours ago, Grimes said:

The mission task is more or less exactly whats in the mission file. https://wiki.hoggitworld.com/view/DCS_task_mission

So to change the route you need to change the x, y, and alt values nested within route.points[index]. With the index numbers counting up from 1 and whatever the highest number being the last waypoint. 

Spans don't matter at all and are only used by the mission editor. Specifically the spans identify the lines used to draw the route in the editor. If you have an on road route with just two waypoints then there would be 2 values within route.points and depending on the length of the route potentially thousands of spans. There aren't many entries remaining in the miz that are only used by the editor, but spans are the most obvious one. 

thanks @Grimes for the explanation. 

I have one follow up question. I've looked at a group that I placed in the mission editor it has 3 waypoints and in the 'points' part of it's lua table it has the x and y position of these points. 

 

When I access those same points for the same group via scripting the first two perfectly match what is in the lua table - but the 3rd one is ALWAYS slightly different.. the numbers aren't identical. It doesn't matter which unit/group I pick, the last waypoint is different when printed out via the scripting vs what I see in the mission editor.

Do you know why this might be? 

Posted

I guess my first question would be "how different is slightly different" ?

Accessing the value via scripting by parsing env.mission is the mission file, its whats stored there. The editor UI does cut off the decimal digits, I'm not sure if it rounds them or not. Don't really have a great answer for you. 

 

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...