Re: Lighters pause in midpoints
Posted: Tue Oct 24, 2017 2:29 am
Will this work?
distances = {}
for key,value in ipairs(beacons) do
for i,unit in ipairs(spawned units)
local distance = math.sqrt((unit.x-k.x)^2 + (unit.y-k.y)^2
table.insert(distances,distance)
end
table.sort(distances)
Then pick the last one?
distances = {}
for key,value in ipairs(beacons) do
for i,unit in ipairs(spawned units)
local distance = math.sqrt((unit.x-k.x)^2 + (unit.y-k.y)^2
table.insert(distances,distance)
end
table.sort(distances)
Then pick the last one?