Wrecking Crew Posted January 2, 2019 Share Posted January 2, 2019 Can a Spherical Zone have an altitude assigned to it? For instance, I want this small-diameter (~70 feet) spherical zone to be about 100 feet off the ground. I am using the zone to detect an aircraft flying through it. Is there a possible Mist solution? I'd like to use something like this - mist.flagFunc.units_in_zones{ units = {'[blue][plane]'}, zones = {'30 Keyhole Zone'}, flag = 93056, zone_type = 'sphere', [color="SeaGreen"]zone_altitude = 100,[/color] interval = .02, } Somehow the ground height is known. From my experience a spherical zone is centered at the 'x' and 'y' coordinates on the ground with half below and half above. The .miz file code for this zone is - [13] = { ["y"] = -114081.72458564, ["radius"] = 23.7744, ["zoneId"] = 253, ["x"] = -114237.40133295, ["color"] = { [1] = 1, [2] = 1, [3] = 0, [4] = 0.14901960784314, }, -- end of ["color"] ["properties"] = { }, -- end of ["properties"] ["hidden"] = false, ["name"] = "30 Keyhole Zone", }, -- end of [13] Is there a Height property or some other attribute that can be assigned in order to get a spherical zone completely above the ground? Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site. Link to comment Share on other sites More sharing options...
Wrench Posted January 3, 2019 Share Posted January 3, 2019 I think the only way you can do this would be to use an 'and' operator, and check that the unit's altitude is less than 100' as well. Carrier Script. Link to comment Share on other sites More sharing options...
Wrecking Crew Posted January 3, 2019 Author Share Posted January 3, 2019 The solution needs to be for any Blue Plane. Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site. Link to comment Share on other sites More sharing options...
Hardcard Posted January 4, 2019 Share Posted January 4, 2019 (edited) Use a group/unit set that includes all blue coalition planes, then iterate the set with a zone check (which includes an altitude check as well). I don't know MIST, but this is how I'd do it in MOOSE: local BlueSet = SET_UNIT:New() :FilterCategories("plane") :FilterCoalitions("blue") :FilterStart() local ME_Zone = ZONE:New("Name of the zone in ME") BlueSet:ForEachUnitCompletelyInZone(ME_Zone, function(BlueSet) local BluePlaneAltitude = BlueSet:GetHeight() if BluePlaneAltitude >= 19.812 and BluePlaneAltitude <= 41.148 --These values correspond to 65ft and 135ft respectively (expressed in meters) then Stuff you want to do end end ) This is pretty much the same as having a 70ft high cylindrical zone centered 100ft off the ground, I guess. Just translate this concept to MIST and problem solved! :thumbup: Edited January 4, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Wrecking Crew Posted January 5, 2019 Author Share Posted January 5, 2019 That's an interesting solution, Hardcard. If I can grab a height/altitude value when any Blue plane is in a cylinder zone then it could work in Mist script. What I did was put a spherical (Mist) zone and a cylinder zone in the same spot. The spherical zone controls the height while the cylinder sets the radius from center. The spherical zone, in this case, has to be much larger than it would need to be if I could place the center of it at the desired altitude. Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site. Link to comment Share on other sites More sharing options...
Wrench Posted January 8, 2019 Share Posted January 8, 2019 You can also use something like local planeheight = <plane reference>:getpoint().y If planeheight < <desired altitude in meters> then... I'm on my phone so I don't have the aytax just right, but you get the idea. I'm fairly certain the altitude (msl) is the "y" value of a vec3 position, but if not it's "z". Carrier Script. Link to comment Share on other sites More sharing options...
Recommended Posts