Skip to content

Commit

Permalink
Merge pull request #356 from Wired-Tiger/AddFnc_TaskAttackOverride
Browse files Browse the repository at this point in the history
Add override capability to fnc_taskAttack
  • Loading branch information
Killswitch00 committed Jun 6, 2016
2 parents f9a05d3 + e531d7b commit caf0721
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion addons/ai/fnc_taskAttack.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Parameters:
Optional:
- Search Radius (Scalar)
- Remove Assigned Waypoints (Bool)
Example:
(begin example)
Expand All @@ -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;

0 comments on commit caf0721

Please sign in to comment.