ACE3/addons/interaction/functions/fnc_handleScrollWheel.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

27 lines
451 B
Plaintext

/*
* Author: commy2
* Handles incremental door opening
*
* Arguments:
* 0: scroll amount <NUMBER>
*
* Return Value:
* handled <BOOL>
*
* Example:
* [5] call ACE_interaction_fnc_handleScrollWheel
*
* Public: No
*/
#include "script_component.hpp"
params ["_scroll"];
if !(GVAR(isOpeningDoor)) exitWith {false};
GVAR(doorTargetPhase) = ((GVAR(doorTargetPhase) + (_scroll / (1.2 * 12))) max 0) min 1;
GVAR(usedScrollWheel) = true;
true