-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
376 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
PREP(garrison); | ||
PREP(unGarrison); | ||
PREP(garrisonMove); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,38 @@ | ||
#include "script_component.hpp" | ||
|
||
[QGVAR(disableAI), { | ||
params [["_units", [], [[]]], "_section"]; | ||
{_x disableAI _section} foreach (_units select {local _x}); | ||
params [["_units", [], [[]]], ["_sections", [], [[]]]]; | ||
{ | ||
private _section = _x; | ||
{ | ||
_x disableAI _section; | ||
LOG(format [ARR_4("XEH_postInit: %1 disableAI %2 | ID %3", _x, _section, clientOwner)]); | ||
} foreach (_units select {local _x}); | ||
} foreach _sections | ||
}] call CBA_fnc_addEventHandler; | ||
|
||
[QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler; | ||
[QGVAR(doMove), { | ||
params ["_unitsArray"]; | ||
{ | ||
_x params ["_unit", "_pos"]; | ||
_unit doMove _pos; | ||
LOG(format [ARR_4("XEH_postInit: %1 doMove %2 | ID %3", _unit, _pos, clientOwner)]); | ||
} foreach _unitsArray | ||
}] call CBA_fnc_addEventHandler; | ||
[QGVAR(setBehaviour), { | ||
params ["_groupsArray", "_behaviour"]; | ||
{ | ||
_x params ["_group"]; | ||
_group setBehaviour _behaviour; | ||
LOG(format [ARR_4("XEH_postInit: %1 setBehaviour %2 | ID %3", _group, _behaviour, clientOwner)]); | ||
} foreach _groupsArray | ||
}] call CBA_fnc_addEventHandler; | ||
[QGVAR(enableAttack), { | ||
params ["_unitsArray", "_mode"]; | ||
{ | ||
_x params ["_unit"]; | ||
_unit enableAttack _mode; | ||
LOG(format [ARR_4("XEH_postInit: %1 enableAttack %2 | ID %3", _unit, _mode, clientOwner)]); | ||
} foreach _unitsArray | ||
}] call CBA_fnc_addEventHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.