Jump to content

Possible to change the ROE of all units within a trigger zone?


Recommended Posts

Posted

Hi guys,

 

I get how to individually change the ROE state of units independently.

 

But when you have a big zone with dozens of units ... it gets painful really fast.

 

Anyone found a trick to change the ROE of all units within a zone (or a large list).

 

Example:

 

- A BLUE collation plane has permission to pass over a large zone. All RED units have ROE WEAPON HOLD.

 

- Then out of sudden the region commander orders that this aircraft must be shut down ...so I want all units in the region to engage if possible (ROE WEAPON FIRE)

 

Looking for generic code that would loop thru all units, instead of coding each one of those.

Posted (edited)

I use sets and iterators for that (and for many other things).

 

For instance (MOOSE example):

 

 

local GroupSet = SET_GROUP:New()

:FilterPrefixes( "Common ME group name prefix that the relevant groups must use" )

:FilterStart()

 

GroupSet:ForEachGroupAlive(

function(GroupSet)

GroupSet:OptionAlarmStateRed()

end

)

 

-- Depending on the type of units in each group, you might have to use other ROE options (for compatibility reasons)

 

GroupSet:ForEachGroupAlive(

function(GroupSet)

GroupSet:OptionROEWeaponFree()

end

)

 

 

Check the the MOOSE documentation for CONTROLLABLE class, you'll find all the relevant ROE functionalities listed there.

Edited by Hardcard
  • Recently Browsing   0 members

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