01-25-2021, 10:08 AM
Mjolnir Wrote:So I've come back to this, and you're going to have to explain how to use this to me like I'm 5 please, cause I dont know where to start
It finds the circle around the units, like this:
_circle = [unit1, unit2, unit3, uint4] call compile preprocessFileLineNumbers "script.sqf";
_circle select 0 is then the center point, and _circle select 1 is the radius.
If you want all player units, you need to get them first:
Code:
_playable = (if (isMultiplayer) then {playableUnits} else {switchableUnits});
_players = [];
{
if (side _x != sideLogic) then {
_players pushBack _x;
};
} forEach _playable;
_circle = _players call compile preprocessFIleLineNumbers "script.sqf";
hint format ["The players are in a circle at %1 with radius %2", _circle select 0, _circle select 1};
If you are using the FHQ framework, you can simply do
_circle = FHQ_PlayableUnits call FHQ_fnc_findBoundingCircle;