diff --git a/addons/ai/fnc_taskAttack.sqf b/addons/ai/fnc_taskAttack.sqf index fb1f34a40..320c864ee 100644 --- a/addons/ai/fnc_taskAttack.sqf +++ b/addons/ai/fnc_taskAttack.sqf @@ -10,6 +10,7 @@ Parameters: Optional: - Search Radius (Scalar) + - Remove Assigned Waypoints (Bool) Example: (begin example) @@ -26,9 +27,14 @@ Author: #include "script_component.hpp" -params ["_group","_position", ["_radius",0]]; +params ["_group","_position", ["_radius",0], ["_override",false]]; _group = _group call CBA_fnc_getGroup; if !(local _group) exitWith {}; // Don't create waypoints on each machine +// Allow TaskAttack to override other set waypoints +if (_override) then { + [_group] call CBA_fnc_clearWaypoints; +}; + [_group, _position, _radius, "SAD", "COMBAT", "RED"] call CBA_fnc_addWaypoint;