Difference between revisions of "DCS func getZone"

From DCS World Wiki - Hoggitworld.com
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
|par4=
 
|par4=
  
|desc= Returns a trigger zone table of a given name
+
|desc= Returns a trigger zone table of a given name.
 +
 
 +
For more information on the zone table you can [[Miz_mission_structure#Triggers| parse the miz]] file to find the table for the zone.
  
 
|rtnType= table
 
|rtnType= table
Line 39: Line 41:
  
 
local zone = trigger.misc.getZone('shortBusStop')
 
local zone = trigger.misc.getZone('shortBusStop')
trigger.action.outText('The Radius of the bus stop zone is: .. '' zone.radius, 20)
+
trigger.action.outText('The Radius of the bus stop zone is: ' .. zone.radius, 20)
  
 
|related=  
 
|related=  
 
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}}
 
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}}
|notes=  
+
|notes= If it is a quad zone then it will not return any information on the points.
 
}}
 
}}
 
[[Category:Singleton Functions|getZone]]
 
[[Category:Singleton Functions|getZone]]
 +
[[Category:Game Patch 1.2.0|getZone]]

Latest revision as of 01:48, 6 September 2024

Scripting Root

Envrioment: Mission Scripting
Function: getZone Added with: 1.2.0
Member Of: trigger.misc
Syntax: table trigger.misc.getZone(string zoneName )
Description: Returns a trigger zone table of a given name.

For more information on the zone table you can parse the miz file to find the table for the zone.


Return Value: table
Return Example: ZoneTable Format
 TriggerZone = {
  point = Vec3,
  radius = Distance
}
Examples: local zone = trigger.misc.getZone('shortBusStop')

trigger.action.outText('The Radius of the bus stop zone is: ' .. zone.radius, 20)

Related Functions: Trigger Functions: ctfColorTag, getUserFlag, setUserFlag, getZone, explosion, smoke, effectSmokeBig, effectSmokeStop, illuminationBomb, signalFlare, radioTransmission, stopRadioTransmission, setUnitInternalCargo

outSound, outSoundForCoalition, outSoundForCountry, outSoundForGroup, outSoundForUnit, outText, outTextForCoalition, outTextForCountry, outTextForGroup, outTextForUnit

addOtherCommand, removeOtherCommand, addOtherCommandForCoalition, removeOtherCommandForCoalition, addOtherCommandForGroup, removeOtherCommandForGroup

markToAll, markToCoalition, markToGroup, removeMark, markupToAll, lineToAll, circleToAll, rectToAll, quadToAll, textToAll, arrowToAll, setMarkupRadius, setMarkupText, setMarkupFontSize, setMarkupColor, setMarkupColorFill, setMarkupTypeLine, setMarkupPositionEnd, setMarkupPositionStart

setAITask, pushAITask, activateGroup, deactivateGroup, setGroupAIOn, setGroupAIOff, groupStopMoving, groupContinueMoving

Notes: If it is a quad zone then it will not return any information on the points.