Page 1 of 1

Need help with reference points in lua

Posted: Thu Jan 16, 2025 5:18 pm
by Shiveluch
Hello friends.
I need something like a checkerboard of 10 by 10 miles reference points relative to, for example, a buoy in the center. I started creating it, but realized that it was very stupid. I need a lot of these cells, like 100 by 100 cells of 10 square miles each.

local point0 = ScenEdit_AddReferencePoint( {side="Swarm", name="p0", RelativeTo="NGS Buoy", bearing=0 ,distance=0})
local point1 = ScenEdit_AddReferencePoint( {side="Swarm", name="p1", RelativeTo="NGS Buoy", bearing=1 ,distance=10})
local point2 = ScenEdit_AddReferencePoint( {side="Swarm", name="p2", RelativeTo="NGS Buoy", bearing=180 ,distance=10})
local point3 = ScenEdit_AddReferencePoint( {side="Swarm", name="p3", RelativeTo="NGS Buoy", bearing=90 ,distance=10})
local point4 = ScenEdit_AddReferencePoint( {side="Swarm", name="p4", RelativeTo="NGS Buoy", bearing=270 ,distance=10})
local point5 = ScenEdit_AddReferencePoint( {side="Swarm", name="p5", RelativeTo="NGS Buoy", bearing=315 ,distance=14.15})
local point6 = ScenEdit_AddReferencePoint( {side="Swarm", name="p6", RelativeTo="NGS Buoy", bearing=45 ,distance=14.15})
local point7 = ScenEdit_AddReferencePoint( {side="Swarm", name="p7", RelativeTo="NGS Buoy", bearing=135 ,distance=14.15})
local point8 = ScenEdit_AddReferencePoint( {side="Swarm", name="p8", RelativeTo="NGS Buoy", bearing=225 ,distance=14.15})
local point9 = ScenEdit_AddReferencePoint( {side="Swarm", name="p9", RelativeTo="NGS Buoy", bearing=1 ,distance=20})
local point10 = ScenEdit_AddReferencePoint( {side="Swarm", name="p10", RelativeTo="NGS Buoy", bearing=180 ,distance=20})
local point11 = ScenEdit_AddReferencePoint( {side="Swarm", name="p11", RelativeTo="NGS Buoy", bearing=90 ,distance=20})
local point12 = ScenEdit_AddReferencePoint( {side="Swarm", name="p12", RelativeTo="NGS Buoy", bearing=270 ,distance=20})

Re: Need help with reference points in lua

Posted: Thu Jan 16, 2025 7:19 pm
by Parel803
Good evening,

Not sure if is helps but from Apache:
https://www.matrixgames.com/forums/view ... s#p4281887

regards GJ

Re: Need help with reference points in lua

Posted: Thu Jan 16, 2025 7:45 pm
by Shiveluch
Parel803 wrote: Thu Jan 16, 2025 7:19 pm Good evening,

Not sure if is helps but from Apache:
https://www.matrixgames.com/forums/view ... s#p4281887

regards GJ
You are hit the mark there! Thanks a million!