mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
21 lines
593 B
Plaintext
21 lines
593 B
Plaintext
/**
|
|
* fn_setCarriedBy.sqf
|
|
* @Descr: Registers an object being carried by another object
|
|
* @Author: Glowbal
|
|
*
|
|
* @Arguments: [unitToBeCarried OBJECT, objectCarrying OBJECT]
|
|
* @Return: BOOL True if succesfully registered
|
|
* @PublicAPI: false
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private ["_unit","_to","_return"];
|
|
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
|
_to = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
|
_return = false;
|
|
if ((isNull ([_unit] call FUNC(getCarriedBy))) || isNull _to) then {
|
|
_return = true;
|
|
_unit setvariable [QGVAR(carriedBy),_to,true];
|
|
};
|
|
_return |