Jump to content

No fly, or protected zone?


Cruachan

Recommended Posts

Hello All,

 

I've really tried to search and find a way to do this, but I haven't had any luck. I'm creating a CAS mission that is being played very close to the border. When you approach the border you'll get a warning from ATC or AWACS that you are dangerously close... if you cross the border, I'd like to begin AAA or flak around the aircraft which may or may not damage you. In this mission, being aware of the border is a big deal.

 

The Open Conflict server used to do just this... Mirknir created a script if you flew too close to the enemy spawn, suddenly you'd have flak all around you that you might be able to avoid. Here is the post where he discusses that:

 

Protected Zones:

https://forums.eagle.ru/showthread.php?p=2492777&highlight=flak#post2492777

 

I tried doing something like this on my own, but my solution didn't work when flying too high etc...

 

Does anyone have an idea how I might be able to do this? I would really love to pull this off, but in lieu of this approach, at least I can spawn a flight of Migs to do an intercept. Also, I'll ask Mirknir later too after he's had more time off. I'm not exactly sure what the culture is of sharing such scripting gold ;)

 

Cheers,

 

-Cru

Link to comment
Share on other sites

Ahh, found a video tutorial talking about this topic:

 

 

With that said, I think I'd like to use a polygon region for the trigger, but at least now I've got the clue I was looking for... this, plus I think I see how to generate an explosion in space... which possibly I could script to go off on some random value relative to the plane's location. With that said, I think most of that work has been done in the above video.

 

Cheers,

 

-Cru

Link to comment
Share on other sites

Just in terms of making a polygon zone, I finally put the pieces together last week to figure it out. Not sure if you've got it down yet or not, but this is what ya gotta do...

 

  • Load the mist_4_3_74.lua file into the mission a second or two after mission start. In my case, at mission start, Flag 1 is on. I load MIST into it with "time since flag" = 1 second.
     
  • Create a unit and create a polygon outlining the zone you want and give it a distinctive name (in my case it's R4808POLY2MILES) Set this unit to late activation.
     
  • Create the unit you want to violate that zone. In my example, it's DODGE11
     
  • Load the zonepolygon script into the mission with a "time since flag". The 900 in my example is the number of the flag that becomes active when DODGE11 violates the polygon. You can set this to whatever number you want.

 

mist.flagFunc.units_in_polygon{
units={'[g][color="Red"]DODGE11[/color]'}, --unit names
zone=mist.getGroupPoints('[color="Magenta"]R4808POLY2MILES[/color]'),
flag=[color="Lime"]900[/color],
interval=20,
}

 

Then when your flag is active, you can start your FLAK script.

 

Again, you may already know this, but it's fairly new to me :-)

171824404_missionstart.thumb.JPG.132188d37ddca983645e615ded27a3c4.JPG

201920129_drawpoly.thumb.JPG.648a5e2af08ef1915dedd8dd69130af2.JPG

393955193_loadscript.thumb.JPG.8ab9355a084a484d0390089a7ead78dd.JPG

Link to comment
Share on other sites

Just in terms of making a polygon zone, I finally put the pieces together last week to figure it out. Not sure if you've got it down yet or not, but this is what ya gotta do...

 

  • Load the mist_4_3_74.lua file into the mission a second or two after mission start. In my case, at mission start, Flag 1 is on. I load MIST into it with "time since flag" = 1 second.
     
  • Create a unit and create a polygon outlining the zone you want and give it a distinctive name (in my case it's R4808POLY2MILES) Set this unit to late activation.
     
  • Create the unit you want to violate that zone. In my example, it's DODGE11
     
  • Load the zonepolygon script into the mission with a "time since flag". The 900 in my example is the number of the flag that becomes active when DODGE11 violates the polygon. You can set this to whatever number you want.

 

mist.flagFunc.units_in_polygon{
units={'[g][color="Red"]DODGE11[/color]'}, --unit names
zone=mist.getGroupPoints('[color="Magenta"]R4808POLY2MILES[/color]'),
flag=[color="Lime"]900[/color],
interval=20,
}

 

Then when your flag is active, you can start your FLAK script.

 

Again, you may already know this, but it's fairly new to me :-)

 

In response to your polygon zone, is that a feature inside of mist or inside of the ME?

Specs:

Fractal Design Define R5 Black, ASUS ROG Strix Z370-E, Intel Core i5-8600K Coffee Lake @ 5.1 GHz, MSI GeForce GTX 1080ti 11GB 352-Bit GDDR5X, Corsair H110i, G.Skill TridentZ 32GB (2x16GB), Samsung 960 Evo M.2 500GB SSD

Link to comment
Share on other sites

Woot! Sedlo, your image where you draw the poly is the last thing I was trying to figure out. I totally get that ;)

 

Destroyer, the ability to detect intrusion into the polygon is a feature of Mist. In my case... the mission is danger-close to the border, which is a no fly zone. Drawing a poly around the border is way better. I've got it working now so that if you stray a bit too far, you get lit up. But, I haven't done it with the polys yet... that's coming now ;)

 

Cheers!

Link to comment
Share on other sites

  • 2 years later...
Just in terms of making a polygon zone, I finally put the pieces together last week to figure it out. Not sure if you've got it down yet or not, but this is what ya gotta do...

 

  • Load the mist_4_3_74.lua file into the mission a second or two after mission start. In my case, at mission start, Flag 1 is on. I load MIST into it with "time since flag" = 1 second.
     
  • Create a unit and create a polygon outlining the zone you want and give it a distinctive name (in my case it's R4808POLY2MILES) Set this unit to late activation.
     
  • Create the unit you want to violate that zone. In my example, it's DODGE11
     
  • Load the zonepolygon script into the mission with a "time since flag". The 900 in my example is the number of the flag that becomes active when DODGE11 violates the polygon. You can set this to whatever number you want.

 

mist.flagFunc.units_in_polygon{
units={'[g][color="Red"]DODGE11[/color]'}, --unit names
zone=mist.getGroupPoints('[color="Magenta"]R4808POLY2MILES[/color]'),
flag=[color="Lime"]900[/color],
interval=20,
}

 

Then when your flag is active, you can start your FLAK script.

 

Again, you may already know this, but it's fairly new to me :-)

 

 

Thanks for this.....

The code worked fine, and I got flag 900 as true when my unit enter the zone....

But how to make the flag to false when I turn around and fly outside the zone?

Could I add a else in the code or something?

 

And what does: interval=20 do?

Link to comment
Share on other sites

Thanks for this.....

The code worked fine, and I got flag 900 as true when my unit enter the zone....

But how to make the flag to false when I turn around and fly outside the zone?

Could I add a else in the code or something?

 

And what does: interval=20 do?

 

Add:

toggle=True

 

underneath interval=20

Link to comment
Share on other sites

I just used regular trigger zones all linked into a master rule set , in my example I have an outer buffer zone down the Iranian coast , if you enter that the AI cold start, take off and then intercept and escort you, and you also receive ATC warnings etc, After several warnings the ATC issues a final warning then the escort issues a warning then they go hot if you haven't left.........I also have an inner zone where the ground defences go hot instantly.......all using no LUA or scripts etc.

 

Been a lot of work but I want to do everything without scripts, because scripts seem to have a habit of breaking in my experience of DCS, due to updates.

Link to comment
Share on other sites

Just in terms of making a polygon zone, I finally put the pieces together last week to figure it out. Not sure if you've got it down yet or not, but this is what ya gotta do...

 

  • Load the mist_4_3_74.lua file into the mission a second or two after mission start. In my case, at mission start, Flag 1 is on. I load MIST into it with "time since flag" = 1 second.
     
  • Create a unit and create a polygon outlining the zone you want and give it a distinctive name (in my case it's R4808POLY2MILES) Set this unit to late activation.
     
  • Create the unit you want to violate that zone. In my example, it's DODGE11
     
  • Load the zonepolygon script into the mission with a "time since flag". The 900 in my example is the number of the flag that becomes active when DODGE11 violates the polygon. You can set this to whatever number you want.

 

mist.flagFunc.units_in_polygon{
units={'[g][color="Red"]DODGE11[/color]'}, --unit names
zone=mist.getGroupPoints('[color="Magenta"]R4808POLY2MILES[/color]'),
flag=[color="Lime"]900[/color],
interval=20,
}

 

Then when your flag is active, you can start your FLAK script.

 

Again, you may already know this, but it's fairly new to me :-)

 

 

What would you replace DODGE11 with , if you wanted to make it a group or coalition ? replace units with "groups" ? what about sides ?


Edited by Phantom_Mark
Link to comment
Share on other sites

  • Recently Browsing   0 members

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