forked from Bob-Murphy/A3-Antistasi-1.4
-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added parameter * using the Parameter instead of constants * needs to be an array * review changes * weird gitness * garage enemyNearCheck changed * review changes, removed getPos * review changes, remove return * review changes, remove 0 * review changes, combined enemiesEngaging and enemyNear * added getPosATL to objects
- Loading branch information
1 parent
1eb155c
commit ff157a0
Showing
11 changed files
with
52 additions
and
22 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
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
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
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
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,6 +1,30 @@ | ||
private ["_unit","_dist","_return"]; | ||
_unit = _this select 0; | ||
_dist = _this select 1; | ||
_return = false; | ||
{if (_x distance _unit < _dist) exitWith {_return = true}} forEach (allUnits select {((side group _x == Occupants) or (side group _x == Invaders)) and ([_x] call A3A_fnc_canFight)}); | ||
_return | ||
/* | ||
Author: [A3A Team] | ||
Enemy near searches | ||
Arguments: | ||
0.<ANY> location/postion that will be used for the center of search | ||
Return Value: | ||
<BOOL> if enemies are near | ||
Scope: Clients | ||
Environment: Unscheduled | ||
Public: yes | ||
Dependencies: | ||
Example: | ||
[cursorObject] call A3A_fnc_enemyNearCheck; | ||
*/ | ||
|
||
params ["_unitPos"]; | ||
|
||
|
||
|
||
private _nearEnemies = (units Occupants + units Invaders) inAreaArray [_unitPos, enemyNearDistance, enemyNearDistance]; | ||
_nearEnemies = _nearEnemies select { behaviour _x == "COMBAT" and _x call A3A_fnc_canFight }; | ||
|
||
|
||
(_nearEnemies isNotEqualTo []) | ||
|
||
|
||
|
||
|
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
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
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
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
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
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