mirror of
https://github.com/SnarkIndustries/A3XAI-Final.git
synced 2024-08-30 17:22:13 +00:00
Releasing previously unreleased version. Completely unsupported with no guarantee of functionality. Use at own risk.
24 lines
805 B
Plaintext
24 lines
805 B
Plaintext
#include "\A3XAI\globaldefines.hpp"
|
|
|
|
private ["_unitGroup","_tooClose","_locationSelected"];
|
|
_unitGroup = _this select 0;
|
|
|
|
_tooClose = true;
|
|
_locationSelected = [0,0,0];
|
|
|
|
while {_tooClose} do {
|
|
_locationSelected = (A3XAI_locationsLand call A3XAI_selectRandom) select 1;
|
|
if (((waypointPosition [_unitGroup,0]) distance2D _locationSelected) > 300) then {
|
|
_tooClose = false;
|
|
};
|
|
};
|
|
|
|
_locationSelected = [_locationSelected,random(300),random(360),0,[1,300]] call A3XAI_SHK_pos;
|
|
[_unitGroup,0] setWPPos _locationSelected;
|
|
[_unitGroup,0] setWaypointCompletionRadius 150;
|
|
if ((count (waypoints _unitGroup)) isEqualTo 1) then {
|
|
_unitGroup setCurrentWaypoint [_unitGroup,0];
|
|
};
|
|
|
|
if (A3XAI_debugLevel > 1) then {diag_log format ["A3XAI Debug: Set %1 waypoint position to %2.",_unitGroup,_locationSelected];};
|