rwbishUP Posted October 17, 2023 Posted October 17, 2023 I know it's probably covered somewhere in the forums, but I haven't found it yet. Is there a way I can use scripting to create trigger zones from draw tool polygons. If so, could someone point me to the forum topic covering some examples of it? ty
Solution cfrag Posted October 17, 2023 Solution Posted October 17, 2023 12 hours ago, rwbishUP said: Is there a way I can use scripting to create trigger zones from draw tool polygons. The API to create zones while the mission is running isn't documented, yet there are some intrepid souls who venture into the deep to use trigger.misc.addZone() (see here) So yeah, you should be able to synthesize trigger zones from draw tool polygons, provided that you stick to 4-point polys (theoretically, DCS zones support more than 4 points, but I have never tested this) or discs. Scanning the draw tools from mission.env.drawings isn't that difficult (if annoying), so yeah, you can do that and use addZone(). My question, however, is: whatever for? Since you can't really use these dynamically generated trigger zones for crating missions (they are inaccessible from ME for the simple reason that they do not exist at the time you edit the mission), what use are they to you? I think it would then be better to simple go straight with your own stuff, rip the area from the polys, and write your own 'inside poly' method (quite easy if you keep to convex polys, unpleasant when you allow concave polys). What are you trying to achieve? It sounds interesting. 1
rwbishUP Posted October 17, 2023 Author Posted October 17, 2023 Thanks @cfrag, will def start studying up on it. I was just cordoning off regions on the PG map, and curiosity just struck while I was using the trusty late activated unit polygon zone piped through MOOSE. I used the draw tool to make the detailed, regional zones visible on the F10 map, and became curious if there were a way to use the polygon created with the draw tool for both my needs, both representing on the map and being the trigger zone. Nothing major, just figured the ppl who know what they're doing (unlike me) probably had already came up with a way to do this. I think I have a secret need to complicate things more than I need to, lol.
buur Posted October 17, 2023 Posted October 17, 2023 If I had it right in my mind this is possible with MOOSE. Check the documentation for that.
Recommended Posts