config stuff, functions to make objects dragable

This commit is contained in:
commy2
2015-03-14 13:51:23 +01:00
parent 58212f5ce0
commit f3f20439c8
8 changed files with 151 additions and 4 deletions

View File

@ -0,0 +1,25 @@
/*
* Author: commy2
*
* Initialize variables for dragable objects. Called from init EH.
*
* Argument:
* 0: Any object (Object)
*
* Return value:
* NONE.
*/
#include "script_component.hpp"
private "_object";
_object = _this select 0;
if (getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(canDrag)) == 1) then {
private ["_position", "_direction"];
_position = getArray (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(dragPosition));
_direction = getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(dragDirection));
[_object, true, _position, _direction] call FUNC(setDraggable);
};