Page MenuHomeFeedback Tracker

[Request] Multi-area variant of inArea/inAreaArray
New, NormalPublic

Description

At the moment inArea/inAreaArray can only check against one area at a time. This means that if you want to check, for example, a complex-shaped area that can only be made of several areas, you have to do something like this:

sqf
private _inArea = false;
{
	if (player inArea _x) then {
		_inArea = true;
		break;
	};
} forEach _areaArray;

To be clear, this works. However, it is slightly annoying, and I think it could be made more better, and possibly more performant, by having a command that can check multiple areas at once. Such a command might be able to optimise for overlapping areas, for instance.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting
Additional Information

Suggested:

_position inAreaComposite ["markerName", _triggerName, [[200,200,0],10,10,90,true,-1], _location];

Event Timeline

NikkoJT created this task.Apr 13 2023, 5:08 PM

I have a need for such command too, comparing unit and even units against list of areas is what I constantly do in my mission.

Naming ideas:
inAreas, inAreasArray
Or maybe
inAreaList, inAreaListArray
I guess we can omit Indexes version