Jump to content

Recommended Posts

Posted

So I want to set a zone around an airbase that is used for training to keep the trainees safe. I have enemy aircraft not too far from the airbase so people can practice air to air skills. Sometimes these enemies follow the students back to the airbase. Sure I could out a lot of air defenses in, but want to keep things simple. So is there a method of saying if any object of a certain type (country or coalition) enters this zone to destroy them? Bonus points if we can make a huge explosion on them as well.

 

Now the enemy fighters come in packs of 4, but sometimes one or two get close...so I don't want to destroy the whole group, just the unit that are violating the airspace.

Coder - Oculus Rift Guy - Court Jester

Posted

Sure. Use simple trigger:

"Switched condition" -> part of coalition in zone (or part of group / unit) -> explode unit (choose unit and explosion volume). To be on the safe side and to make it work best, I would set up a trigger for each enemy unit which may enter the zone, in which case use once -> unit in zone -> explode unit.

For more information, please visit my website. If you want to reach me with a bug report, feedback or a question, it is best to do this via my Discord channel.
Details about the WinWing draw can be found here. Also, please consider following my channel on Facebook.

Posted

So I would have to do it for each unit, since if I do it by group I wouldn't really know which unit in that group to explode...or does the ME automatically assume it's the unit that is in the zone?

Coder - Oculus Rift Guy - Court Jester

Posted

Unfortunately, to be 100% sure you'd need to do it by unit.

Or use a script, I am sure there is one good just for that, but somebody else would have to help you with that.

For more information, please visit my website. If you want to reach me with a bug report, feedback or a question, it is best to do this via my Discord channel.
Details about the WinWing draw can be found here. Also, please consider following my channel on Facebook.

Posted

Here are a few examples of the way I use Mist to detect units in zones.

 

mist.flagFunc.units_in_zones{ 
units = {'[blue][plane]'}, 
zones = {'Test Zone'}, 
flag = 50107, 
zone_type = 'cylinder', 
}

mist.flagFunc.units_in_zones{ 
   units = {'[blue][plane]'}, 
   zones = {'Test Zone'}, 
   flag = 50207, 
   zone_type = 'sphere',
   toggle = true,	
}



mist.flagFunc.units_in_zones{
units = {'[blue][vehicle]'},
zones = {'Point Bastion'},
flag = 99,
req_num = 8,
stopflag = 1000,
   toggle = true,
}

mist.flagFunc.units_in_zones{ 
   units = {'[red][plane]'}, 
   zones = {'Ready to Attack Ground Units'}, 
   flag = 10007, 
   zone_type = 'cylinder',
   stopflag = 10004,
   toggle = true, 
}

 

Link to Mist, from Grimes --

http://forums.eagle.ru/showpost.php?p=1622305&postcount=3

 

Look in the Mist guide, around Page 15 for this units in zone function description.

 

WC

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Posted

Add Mist to your mission and create a one-time DO SCRIPT trigger:

 

local groups = mist.makeUnitTable({'[red]'})
local safezones = {'Safezone'}

deactivateUnitsInSafezone = function(groups, safezones)
for i, unit in pairs (mist.getUnitsInZones(groups, safezones, 'cylinder')) do
	trigger.action.deactivateUnitsInSafezoneGroup(unit)
end
mist.scheduleFunction(deactivateUnitsInSafezone, {groups, safezones}, timer.getTime() + 1)
end

deactivateUnitsInSafezone(groups, safezones)

aka: Baron

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

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