SGT Coyle Posted September 28, 2020 Share Posted September 28, 2020 (edited) 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. Any help or thoughts would be appreciated. Thanks Edited September 28, 2020 by SGT Coyle Code previously posted was flawed Night Ops in the Harrier IYAOYAS Link to comment Share on other sites More sharing options...
SGT Coyle Posted September 30, 2020 Author Share Posted September 30, 2020 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 More sharing options...
HC_Official Posted October 1, 2020 Share Posted October 1, 2020 (edited) 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 October 1, 2020 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 More sharing options...
Recommended Posts