mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
28 lines
485 B
Plaintext
28 lines
485 B
Plaintext
/*
|
|
Name: ACE_SwitchUnits_fnc_isValidAi
|
|
|
|
Author(s):
|
|
bux578
|
|
|
|
Description:
|
|
Checks if AI is a valid target for switching
|
|
|
|
Parameters:
|
|
0: OBJECT - unit
|
|
|
|
Returns:
|
|
VOID
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private ["_unit"];
|
|
|
|
_unit = _this select 0;
|
|
|
|
!([_unit] call EFUNC(common,isPlayer)
|
|
|| {_unit in playableUnits}
|
|
|| {vehicle _unit != _unit}
|
|
|| {_unit getVariable [QGVAR(IsPlayerUnit), false]}
|
|
|| {_unit getVariable [QGVAR(IsPlayerControlled), false]})
|