mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
cee187adac
Convert vehicle to objectParent
25 lines
503 B
Plaintext
25 lines
503 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: bux578
|
|
* Checks if AI is a valid target for switching.
|
|
*
|
|
* Arguments:
|
|
* 0: unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Valid AI <BOOL>
|
|
*
|
|
* Example:
|
|
* [_unit] call ace_switchunits_fnc_isValidAi
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params ["_unit"];
|
|
|
|
!([_unit] call EFUNC(common,isPlayer)
|
|
|| {_unit in playableUnits}
|
|
|| {!isNull objectParent _unit}
|
|
|| {_unit getVariable [QGVAR(IsPlayerUnit), false]}
|
|
|| {_unit getVariable [QGVAR(IsPlayerControlled), false]}) // return
|