2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-06-12 21:54:51 +00:00
|
|
|
/*
|
|
|
|
* Author: Rocko, Ruthberg
|
|
|
|
* Deploy tactical ladder
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-09-26 01:16:55 +00:00
|
|
|
* 0: unit <OBJECT>
|
2015-06-12 21:54:51 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-07 06:19:15 +00:00
|
|
|
* None
|
2015-06-12 21:54:51 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-09-26 01:16:55 +00:00
|
|
|
* [_unit] call ace_tacticalladder_fnc_deployTL
|
2015-06-12 21:54:51 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-06-03 18:27:52 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
params ["_unit"];
|
|
|
|
|
|
|
|
if (backpack _unit != 'ACE_TacticalLadder_Pack') exitWith {};
|
|
|
|
|
|
|
|
removeBackpack _unit;
|
2015-06-12 21:54:51 +00:00
|
|
|
|
2015-06-12 20:45:41 +00:00
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _pos = _unit modelToWorld [0,0,0];
|
2024-02-04 17:50:24 +00:00
|
|
|
private _offset = [0.8, 1] select (_unit call CBA_fnc_getUnitAnim select 0 == "prone");
|
2015-06-03 18:27:52 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
_pos set [0, (_pos select 0) + (sin getDir _unit) * _offset];
|
|
|
|
_pos set [1, (_pos select 1) + (cos getDir _unit) * _offset];
|
|
|
|
_pos set [2, [_unit] call CBA_fnc_realHeight];
|
2015-06-03 18:27:52 +00:00
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _ladder = "ACE_TacticalLadder" createVehicle _pos;
|
2015-06-03 18:27:52 +00:00
|
|
|
_ladder setPos _pos;
|
2015-09-26 01:16:55 +00:00
|
|
|
_ladder setDir getDir _unit;
|
2015-06-12 20:45:41 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
_unit reveal _ladder;
|