Jump to content

Recommended Posts

Posted

Does anyone know how to get the zone type values and vertices data from a quad point zone placed in the ME during runtime via script?

For example I have:

local Sector = trigger.misc.getZone(RED_SectorList[i])
local SectorVec3 = Sector.point
local SectorRadius = Sector.radius

It looks like a quad point zone has a 'type' of 2 and a table of vertices, but if I try Sector.type I get a nil return. Can't seem to find anything about it anywhere.

 

 

Posted

getZone only returns circular zones still, you have to parse the the mission table. You can save it and reference the zone name to get the vertices. 

local zones = {}
if env.mission.triggers and env.mission.triggers.zones then
	for zone_ind, zone_data in pairs(env.mission.triggers.zones) do
    	zones[zone_data.name] = zone_data
  	end
end

 

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...