Hey FlightControl; this is a great mod. Kudos for you and the whole MOOSE team.
I have a question for the devs, I am using the SPAWNSTATIC class to create some static trucks from a given point (using the SpwanFromPointVec2 method), and it works ok. The thing is I need this statics to be hidden, so they don't appear on the F10 map, but I can't find the way to do it.
This is the code I am using:
-- Zonas iniciales de generación de objetos estáticos
ZonaEstaticos01 = ZONE:New("ZonaEstaticos01")
ZonaEstaticos02 = ZONE:New("ZonaEstaticos02")
PointVecZ01 = ZonaEstaticos01:GetPointVec2()
PosX1 = PointVecZ01:GetX()
PosY1 = PointVecZ01:GetY()
PointVecZ02 = ZonaEstaticos02:GetPointVec2()
PosX2 = PointVecZ02:GetX()
PosY2 = PointVecZ02:GetY()
SpawnEstatico = SPAWNSTATIC:NewFromStatic("Estatico", country.id.RUSSIA)
for cont = 0, 19, 1 do
-- las funciones math.sin y math.cos toman los valores en radianes, no en grados
-- radianes = grados * pi / 180
local x1 = PosX1 + (cont * 50 * math.sin(252 * math.pi / 180))
local y1 = PosY1 - (cont * 50 * math.sin(342 * math.pi / 180))
SpawnEstatico:SpawnFromPointVec2(POINT_VEC2:New(x1, y1), 342, "RusStat_"..cont)
local x2 = PosX2 + (cont * 50 * math.sin(301 * math.pi / 180))
local y2 = PosY2 - (cont * 50 * math.sin(31 * math.pi / 180))
SpawnEstatico:SpawnFromPointVec2(POINT_VEC2:New(x2, y2), 31, "RusStat_"..cont + 20)
end
The object "Estatico" is marked as hidden in ME.