Jump to content

Trying to change a Group's waypoint position - Where's the Z gone?


Recommended Posts

Posted

So I'm using scripting but not any 3rd party frameworks. 

I'm trying to wrap my head around the Group structure and how to manipulate it.

Specifically, I'm either trying to change a groups 'starting position' or the last waypoint's position.

From what I know about the units x is East West, z is North, South and y is into or out of the screen/map.

However, when I just peeked into my .miz file for the specific group I'm looking for I found this:

     ["groupId"] = 727,
     ["hidden"] = true,
     ["units"] = 
     {
         [1] = 
         {
             ["skill"] = "Good",
             ["AddPropVehicle"] = 
             {
                 ["TentedRoof"] = true,
             }, -- end of ["AddPropVehicle"]
             ["coldAtStart"] = false,
             ["type"] = "MAMPilot",
             ["unitId"] = 1378,
             ["y"] = -62505.124489064,
             ["x"] = -256156.69920826,
             ["name"] = "x_Civilian_-1-1",
             ["heading"] = -1.3460851570281,
             ["playerCanDrive"] = false,
         }, -- end of [1]
     }, -- end of ["units"]
     ["y"] = -62505.124489064,
     ["x"] = -256156.69920826,
     ["name"] = "x_Civilian_-1",
     ["start_time"] = 0,
     ["manualHeading"] = false,
     ["hiddenOnPlanner"] = true,
 }, -- end of [11]

So I can see that the Groups position is the say as the first unit's position (this group only has ONE unit, so that makes sense).

However, all the positions are specified in X and Y. There is no Z.

So what am I missing? Is this using Y in place of Z? And if so, then a) Thanks for being in-consistent and b) how does it know the vertical (y) value upon which to spawn the unit so it isn't under water/land or floating in the sky? How does this even work with an aircraft? (This example code is using an infantry group/unit)

What am I missing?

How best do I iterate down the waypoints to find the last one?

Thanks

 

  • Recently Browsing   0 members

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