/* * Author: Glowbal * Returns an 2d array of all variables that have been set on the object * * Arguments: * 0: Unit * 1: Limiting Category (default: "") * * Return Value: * Variable Data * 0: Name * 1: typeName * 2: value * 3: publicFlag * 4: peristentFlag * * Public: Yes */ #include "script_component.hpp" params ["_object", ["_category", ""]]; if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]}; private ["_return", "_val"]; _return = []; { _val = _object getvariable (_x select 0); if (!isNil "_val") then { if (_category == "" || _category == _x select 3) then { _return pushBack [_x select 0, typeName _val, _val, _x select 2, _x select 5]; }; }; false } count GVAR(OBJECT_VARIABLES_STORAGE); _return