-
Notifications
You must be signed in to change notification settings - Fork 2
In Area
Mike-MF edited this page Jul 22, 2025
·
1 revision
This page will explain the usage of the inArea function.
/*
* Author: Mike
* Checks if any unit in a list is inside of an area.
*
* Can be called anywhere.
*
* Arguments
* 0: Unit Array <ARRAY>
* 1: Marker <MARKER>
*
* Return Value:
* BOOL
*
* Example:
* [[myGuy, myOtherGuy], "MyMarker"] call MFUNC(inArea)
*/This function is primarily designed for Per frame handler style triggers, checking if players are within a marker radius. It can be used to check for individual AI units in an array, but not via groups.
Example:
[{
params ["_args", "_handle"];
_args params [["_A", false]];
private _players = [true] call MFUNC(players);
if (!_A) then {
if ([_players, "MyMarker"] call MFUNC(inArea)) then {
_args set [0, true];
};
};
}, 3] call CBA_fnc_addPerFrameHandler;Alternate Example:
private _groupUnits = units MyGroup;
private _inArea = [_groupUnits, "MyMarker"] call MFUNC(inArea);
if (_inArea) then {};Pages
- Home
- Your First Mission
- Creating A Mission
- Contract Missions
- Difficulty Guidelines
- Events
-
Functions Library
- Ambient Effects
- Base Spectator
- Bomber
- Car Alarm
- Chemical Detector
- Collect Intel
- Connect Battery To Defusable
- Contamination Gas
- Count Alive
- Dialogue
- Disable AI
- Download Intel
- Earthquake
- Enable AI
- Force Shooting
- Ground Fog
- Hunt
- In Area
- Lock Doors
- Mark Buildings
- Monitor Units
- Mortar Strike
- Ping
- Players
- Reaction
- Reinforcements
- Reinforcement Waves
- Respirator Effects
- Set Sleeping
- Sound Source
- Surrender
- Switch Action
- Teleport
- Toggle Lights
- Trigger Area
- Helicopters
- Resources
- Quality Checklist
- Useful Commands
- ArmaQDL