Jump to content

Moose Zone_Radius:New()


SGT Coyle

Recommended Posts

Trying to create a Radius Zone without using a ME placed Group/Unit/Static.

Been kicking around this idea for the past few days on Discord, although there's been plenty of help, I haven't been able to crack this nut.

 

 

So this is the script:

 

MPZ = ZONE_POLYGON:NewFromGroupName("MPZ")    -- Master Point Zone - A Poly zone to contain and generate random point.
MPZ:SmokeZone( SMOKECOLOR.White, 10 )        -- temporary for testing

local vec2Points = {}        -- Table of vec2 points to be used to create trigger zones
--local coordPoints = {}        -- Table of vec2 points to be converted to LLMDS/MGRS/F10Marks/BRA/BullsCall
   for i = 1, 5 do
       local RPoMPZ = MPZ:GetRandomPointVec2()        
       RPoMPZ:SmokeBlue()
       table.insert(vec2Points, RPoMPZ)        
   end

  navZone_1 = vec2Points[1]  [b]-- this variable is nil and code breaks here.[/b]

How can I get my "vec2Point[1]" to produce something I can use? I assumed there was useful data in that table, as all the random points get blue smoke within the poly zone.

 

 

attachment.php?attachmentid=248636&stc=1&d=1601307479

 

 

 

 

Any help or thoughts would be appreciated.

Thanks

Zone_2.thumb.png.5265b36f683a29f755c08144fad82178.png


Edited by SGT Coyle
Code previously posted was flawed

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

Creat 5 random points in my poly zone and retrieve the first point to spawn a RadiusZone. But I first have to get a Vec2 position to put into the Radius_Zone:NewFromVec2(vec2,altitude) function.

 

 

I removed the smoke but still did not get what I thought I should.

[ClassName]=POINT_VEC2

I was expecting an x and y numbers.

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

point_vec2 is not the same as vec2

 

 

best guess

 

 

vec2 = {x = point_vec2.X , y = point_vec2.Y }

 

 

you kinda need to know what is inside a point_vec2 and then access it


Edited by HC_Official

No more pre-orders

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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