Things are getting worse for me now!
The more I fiddled with the script, the more errors came popping up. Anything wrong with this?
******************************
mist.flagFunc.units_LOS{
unitset1 = {'991'},
altoffset1 = 2,
unitset2 = {'Player', 'Player2', 'player3},
altoffset2 = 0,
flag = 3,
stopflag = 4,
radius = 3000
}
********************
Above links to this
*************************************
local unit = Unit.getByName('Player', 'Player2', 'Player3')
local pos = unit:getPosition().p
local distance = math.sqrt((pos.x-PilotPosition.x)*(pos.x-PilotPosition.x)+(pos.z-PilotPosition.z)*(pos.z-PilotPosition.z))
if distance < 50 then
return true
else
return false
end