2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-06-12 21:54:51 +00:00
|
|
|
/*
|
2015-09-26 01:16:55 +00:00
|
|
|
* Author: Rocko, Ruthberg, commy2
|
2015-06-12 21:54:51 +00:00
|
|
|
* Cancel tactical ladder deployment
|
|
|
|
*
|
|
|
|
* Arguments:
|
2016-03-03 16:35:43 +00:00
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Key <NUMBER>
|
2015-06-12 21:54:51 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2018-04-19 17:20:18 +00:00
|
|
|
* [player, 1] call ace_tacticalladder_fnc_cancelTLdeploy
|
2015-06-12 21:54:51 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-06-03 18:27:52 +00:00
|
|
|
|
|
|
|
#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"]
|
|
|
|
|
2016-03-03 16:35:43 +00:00
|
|
|
params ["_unit", "_key"];
|
|
|
|
|
2016-03-06 11:06:17 +00:00
|
|
|
if (_key != 1 || {isNull GVAR(ladder)}) exitWith {};
|
2015-09-26 01:16:55 +00:00
|
|
|
|
|
|
|
// enable running again
|
2016-01-19 15:34:59 +00:00
|
|
|
[_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);
|
2017-12-07 17:26:21 +00:00
|
|
|
[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);
|
2015-06-03 18:27:52 +00:00
|
|
|
|
2016-03-03 16:35:43 +00:00
|
|
|
detach GVAR(ladder);
|
2015-09-26 01:16:55 +00:00
|
|
|
|
2016-03-03 16:35:43 +00:00
|
|
|
GVAR(ladder) animate ["rotate", 0];
|
2015-09-26 01:16:55 +00:00
|
|
|
|
2015-06-12 20:45:41 +00:00
|
|
|
{
|
2016-03-03 16:35:43 +00:00
|
|
|
GVAR(ladder) animate [_x, 0];
|
2018-10-10 01:21:46 +00:00
|
|
|
} forEach __ANIMS; //Don't "optimize" this to a count. See #6607
|
2015-06-03 18:27:52 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
// remove mouse buttons and hint
|
2015-06-12 21:54:51 +00:00
|
|
|
call EFUNC(interaction,hideMouseHint);
|
2015-09-26 01:16:55 +00:00
|
|
|
|
|
|
|
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
2015-06-12 21:54:51 +00:00
|
|
|
|
|
|
|
GVAR(ladder) = objNull;
|