-
Notifications
You must be signed in to change notification settings - Fork 1
Count Alive
Mike-MF edited this page Jun 5, 2023
·
1 revision
This page will explain the usage of the Count Alive function.
/*
* Author: Mike
* Returns count of alive units in given groups.
*
* Arguments:
* 0: Groups <ARRAY>
*
* Return Value:
* Count of alive units <NUMBER>
*
* Example:
* [[My_Group_One, My_Group_Two]] call MFUNC(countAlive);
*
*/
This function will return the count of alive units in the array of groups provided.
This function does return a value, save it as a private variable and check it that way. (Example 2)
Only call on the server.
Example 1:
private _myCount = [[My_Group_One, My_Group_Two]] call MFUNC(countAlive);
Example 2: (Checking code)
if (_myCount < 20) then {};
Pages
- Home
- Your First Mission
- Creating A Mission
- Contract Missions
- Difficulty Guidelines
-
Functions Library
- 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
- 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