A function for a group to defend a parsed location. Should be ran locally.
Units will mount nearby static machine guns and garrison in nearby buildings. 10% chance to patrol the radius unless specified differently (100% when no available building positions). 0% chance to hold defensive positions in combat unless specified differently.
_group | the group <GROUP, OBJECT> |
_position | centre of area to defend <ARRAY, OBJECT, LOCATION, GROUP> (Default: _group) |
_radius | radius of area to defend <NUMBER> (Default: 50) |
_threshold | minimum building positions required to be considered for garrison <NUMBER> (Default: 3) |
_patrol | chance for each unit to patrol instead of garrison, true for default, false for 0% <NUMBER, BOOLEAN> (Default: 0.1) |
_hold | chance for each unit to hold their garrison in combat, true for 100%, false for 0% <NUMBER, BOOLEAN> (Default: 0) |
None
[this] call CBA_fnc_taskDefend
Rommel, SilentSpike