ACE3/addons/interaction/functions/fnc_canInteractWithCivilian.sqf

25 lines
534 B
Plaintext
Raw Normal View History

/*
* Author: commy2
* Checks if the player can interact with civilian
*
* Arguments:
* 0: Target <OBJECT>
*
* Return value:
* Able to interact with civilian <BOOL>
*
* Example:
* _bool = [target] call ace_interaction_fnc_canInteractWithCivilian
*
* Public: No
*/
2015-03-03 02:30:11 +00:00
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_unit,_isCivilian);
if (isNil "_isCivilian") then {_isCivilian = true};
alive _unit
&& [side _unit != side ACE_player, side group _unit == civilian] select _isCivilian
//&& {count (weapons _unit) == 0}