marcost Posted July 12, 2022 Share Posted July 12, 2022 I've searched and read, but can't find how to do this with DCS lua or MIST (even though similar questions were pointed in this direction). I want to be able to create trigger zones with a script rather than ME. Why? Because I can then import them into other pre-existing missions using the same map. I will know what the x & y co-ordinates and radius need to be. I just need to know if it can be created within a script? Pseudo-code: CreateZone{ x = 1000 y = 2000 z = 0 radius = 3000 name = myZone} Thanks M W10 64 I7 4790k o/c to 4.6Ghz Asus Maximus Ranger VII 24gb DDR3 RAM @ 2133 Asus Strix 1080ti OC ASUS ROG G-sync 27" monitor DCS on M2 drive Samsung 960 Pro MS FFB2 with F-16 grip CH pro throttle MFG Crosswind pedals TrackIR 5 3 x Bodnar button & axis boxes Link to comment Share on other sites More sharing options...
Kanelbolle Posted July 13, 2022 Share Posted July 13, 2022 You can use MOOSE: https://github.com/FlightControl-Master/MOOSE/blob/master/Moose Development/Moose/Core/Zone.lua 1 WARGAMES Servers: https://forum.dcs.world/topic/301046-wargames-server-pvp-and-pve-campaign-servers/ Scripts: RGC & SPGG https://github.com/AGluttonForPunishment/ Link to comment Share on other sites More sharing options...
Grimes Posted July 13, 2022 Share Posted July 13, 2022 There actually is an addZone function in the simulator scripting engine, however I've never been told the syntax for it, thus it remains undocumented. That said it doesn't really matter because with scripting the things you'd use it for can be done with simple math for the coordinates and radius anyway. 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
marcost Posted July 13, 2022 Author Share Posted July 13, 2022 Thanks both, You put me on the right path, especially with the fact that only co-ordinates are required. I'm now a MIST user! Regards, M W10 64 I7 4790k o/c to 4.6Ghz Asus Maximus Ranger VII 24gb DDR3 RAM @ 2133 Asus Strix 1080ti OC ASUS ROG G-sync 27" monitor DCS on M2 drive Samsung 960 Pro MS FFB2 with F-16 grip CH pro throttle MFG Crosswind pedals TrackIR 5 3 x Bodnar button & axis boxes Link to comment Share on other sites More sharing options...
PravusJSB Posted July 15, 2022 Share Posted July 15, 2022 (edited) Here is how I add zone's using the SSE 'addZone' function, hope this helps; local function add_zone(name, x, y, radius) if trigger.misc.getZone(name) then return trigger.misc.getZone(name) end return trigger.misc.addZone { ["name"] = name, ["y"] = y, ["x"] = x, ["radius"] = radius, ["properties"] = { [1] = { ["key"] = name, ["value"] = "", }, }, ["color"] = {0,0,0,1}, ["hidden"] = false, } end local new_zone = add_zone(zone.name, zone_position.x, zone_position.z, zone.size) Edited July 15, 2022 by PravusJSB 2 Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans. Discord: PravusJSB#9484 twitch.tv/pravusjsb https://www.patreon.com/XSAF https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu Work with me on Fiverr: https://www.fiverr.com/pravusjsb Link to comment Share on other sites More sharing options...
marcost Posted July 17, 2022 Author Share Posted July 17, 2022 It does, thank you! W10 64 I7 4790k o/c to 4.6Ghz Asus Maximus Ranger VII 24gb DDR3 RAM @ 2133 Asus Strix 1080ti OC ASUS ROG G-sync 27" monitor DCS on M2 drive Samsung 960 Pro MS FFB2 with F-16 grip CH pro throttle MFG Crosswind pedals TrackIR 5 3 x Bodnar button & axis boxes Link to comment Share on other sites More sharing options...
Elphaba Posted October 26, 2022 Share Posted October 26, 2022 On 7/15/2022 at 3:11 PM, PravusJSB said: Here is how I add zone's using the SSE 'addZone' function, hope this helps; local function add_zone(name, x, y, radius) if trigger.misc.getZone(name) then return trigger.misc.getZone(name) end return trigger.misc.addZone { ["name"] = name, ["y"] = y, ["x"] = x, ["radius"] = radius, ["properties"] = { [1] = { ["key"] = name, ["value"] = "", }, }, ["color"] = {0,0,0,1}, ["hidden"] = false, } end local new_zone = add_zone(zone.name, zone_position.x, zone_position.z, zone.size) How did you find out about this function? I can't even find reference to the 'misc' list of commands. I'd really appreciate it if you could explain how you worked this out so I can do the same. Thanks. Link to comment Share on other sites More sharing options...
OzDeaDMeaT Posted September 20, 2023 Share Posted September 20, 2023 (edited) On 7/16/2022 at 12:11 AM, PravusJSB said: Here is how I add zone's using the SSE 'addZone' function, hope this helps; local function add_zone(name, x, y, radius) if trigger.misc.getZone(name) then return trigger.misc.getZone(name) end return trigger.misc.addZone { ["name"] = name, ["y"] = y, ["x"] = x, ["radius"] = radius, ["properties"] = { [1] = { ["key"] = name, ["value"] = "", }, }, ["color"] = {0,0,0,1}, ["hidden"] = false, } end local new_zone = add_zone(zone.name, zone_position.x, zone_position.z, zone.size) Awesome function mate. Is there a removeZone as well? Also, what is "SSE"? Edited September 20, 2023 by OzDeaDMeaT CPU: i9-12900K @ 4.9Ghz M/B: MSI MEG z690 Ace RAM: 128GB Video Card: MSI RTX 4090 Suprim Liquid X VR: Varjo Aero Link to comment Share on other sites More sharing options...
Recommended Posts