ACE3/addons/common/functions/fnc_getLocalUnits.sqf
Dedmen Miller 7f04d00b7f Add localUnits array and use that inside medical statemachines (#4836)
* Added localUnits EH

Code by @Commy2

* Init localUnits Variable

* use localUnits for medical_blood statemachine

* use localUnits for medical_ai statemachine

* Remove bracket hell

* Add Deleted EH

* Run at preInit, move to seperate file

* Handle Respawns, Filter Dead

* Add detection for Fake deleted EH

* Use a getter function

* delete all objNull at deletedEH

* Cleanup header/comments

* Move isBleeding check to inside statemachine

* opps

* debug off
2019-02-26 23:28:16 -06:00

24 lines
499 B
Plaintext

#include "script_component.hpp"
/*
* Author: dedmen
* Gets localUnits array filtering out nullObjects.
* If you can handle null objects you can use the array `ace_common_localUnits` directly.
* Should be equivalent to `allUnits select {local _x}`
*
* Arguments:
* Nothing
*
* Return Value:
* Array of local Units <ARRAY>
*
* Example:
* [] call ace_common_fnc_getLocalUnits
*
* Public: Yes
*/
// Remove null objects
GVAR(localUnits) = GVAR(localUnits) - [objNull];
GVAR(localUnits)