ACE3/addons/intelitems/functions/fnc_setObjectData.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

31 lines
603 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: PabstMirror, mharis001
* Sets the intel data for an object. Used by 3DEN and Zeus attributes.
*
* Arguments:
* 0: Object <OBJECT>
* 1: Data <STRING>
*
* Return Value:
* None
*
* Example:
* [cursorObject, "123"] call ace_intelitems_fnc_setObjectData
*
* Public: No
*/
params ["_object", "_data"];
private _index = _object getVariable [QGVAR(index), -1];
if (_index == -1) then {
_index = GVAR(intelCount);
GVAR(intelCount) = GVAR(intelCount) + 1;
_object setVariable [QGVAR(index), _index, true];
};
SET_DATA(_index,_data);