fix(sar): align hoist timing with winch audio
This commit is contained in:
@@ -1,27 +1,21 @@
|
||||
// Declaração de variáveis:
|
||||
// Declaracao de variaveis:
|
||||
params ["_heli"];
|
||||
|
||||
// Criação e posicionamento do assento:
|
||||
|
||||
// Espera de 1 segundo
|
||||
sleep 1;
|
||||
|
||||
// Texto que aparece no side channel
|
||||
_heli vehicleChat "Deploying Rescue Seat";
|
||||
|
||||
// Criação do veículo _rescueseat
|
||||
private _rescueseat = "BRAF_Rescue_Seat" createVehicle [0, 0, 0];
|
||||
// Criacao e posicionamento do assento
|
||||
private _rescueSeat = "BRAF_Rescue_Seat" createVehicle [0, 0, 0];
|
||||
_rescueSeat setDir (getDir _heli);
|
||||
_rescueSeat setPosASL (_heli modelToWorld [0, 0, -1.5]);
|
||||
|
||||
// Mudança de Orientação do _rescueseat
|
||||
_rescueseat setDir (getDir _heli);
|
||||
// Criacao do cabo
|
||||
private _hoistRope = ropeCreate [_heli, "rope_start", _rescueSeat, "hoist_point", 0.25];
|
||||
|
||||
// Mudança de posição do _rescueseat
|
||||
_rescueseat setPosASL (_heli modelToWorld [0, 0, -1.5]);
|
||||
_heli setVariable ["rescueseat", _rescueSeat];
|
||||
_heli setVariable ["hoistrope", _hoistRope];
|
||||
|
||||
// Criação do Cabo
|
||||
private _hoistrope = ropeCreate [_heli, "rope_start", _rescueseat, "hoist_point", 0.25];
|
||||
|
||||
_heli setVariable ["rescueseat", _rescueseat];
|
||||
_heli setVariable ["hoistrope", _hoistrope];
|
||||
|
||||
_heli;
|
||||
_heli;
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
// Declaração de variáveis
|
||||
params ["_panther"];
|
||||
// Corte do Cabo
|
||||
private _rope = _panther getVariable ["hoistrope", objNull];
|
||||
if (isNull _rope) then {
|
||||
_panther vehicleChat "no rope!";
|
||||
// Declaracao de variaveis
|
||||
params ["_heli"];
|
||||
|
||||
private _rope = _heli getVariable ["hoistrope", objNull];
|
||||
|
||||
if (isNull _rope) exitWith {
|
||||
_heli vehicleChat "no rope!";
|
||||
};
|
||||
|
||||
// Corte do cabo
|
||||
ropeCut [_rope, 0];
|
||||
ropeDestroy _rope;
|
||||
_panther setVariable ["hoistrope", nil];
|
||||
_heli setVariable ["hoistrope", nil];
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
// Declaração de variáveis:
|
||||
params ["_panther"];
|
||||
// Declaracao de variaveis:
|
||||
params ["_heli"];
|
||||
|
||||
// Extensão do Cabo
|
||||
ropeUnwind [_panther getVariable "hoistrope", 1.15, 25, false];
|
||||
private _rope = _heli getVariable ["hoistrope", objNull];
|
||||
|
||||
if (isNull _rope) exitWith {};
|
||||
|
||||
private _targetLength = 25;
|
||||
private _duration = 16;
|
||||
private _currentLength = ropeLength _rope;
|
||||
private _speed = ((_targetLength - _currentLength) max 0.01) / _duration;
|
||||
|
||||
// Extensao do cabo com duracao alinhada ao audio do guincho.
|
||||
ropeUnwind [_rope, _speed, _targetLength, false];
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
// Declaração de variáveis
|
||||
params ["_panther"];
|
||||
// Declaracao de variaveis
|
||||
params ["_heli"];
|
||||
|
||||
// Recuperação do Cabo
|
||||
ropeUnwind [_panther getVariable "hoistrope", 1.15, 0.25, false];
|
||||
private _rope = _heli getVariable ["hoistrope", objNull];
|
||||
|
||||
if (isNull _rope) exitWith {};
|
||||
|
||||
private _targetLength = 0.25;
|
||||
private _duration = 16;
|
||||
private _currentLength = ropeLength _rope;
|
||||
private _speed = ((_currentLength - _targetLength) max 0.01) / _duration;
|
||||
|
||||
// Recuperacao do cabo com duracao alinhada ao audio do guincho.
|
||||
ropeUnwind [_rope, _speed, _targetLength, false];
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
// Declaração de variáveis
|
||||
params ["_heli", "_player"];
|
||||
// Declaracao de variaveis
|
||||
params ["_heli"];
|
||||
|
||||
// Récupération des victimes (thx to Tetet)
|
||||
private _basket = _heli getVariable ["rescueseat", objNull];
|
||||
private _rope = _heli getVariable ["hoistrope", objNull];
|
||||
private _length = ropeLength _rope;
|
||||
|
||||
if (isNull _rope) then {
|
||||
if (isNull _rope) exitWith {
|
||||
_heli vehicleChat "no rope!";
|
||||
};
|
||||
|
||||
private _length = ropeLength _rope;
|
||||
|
||||
if (_length <= 3.1) then {
|
||||
{
|
||||
if (!isNil "_x") then {
|
||||
_x leaveVehicle _basket;
|
||||
_x action["GetOut", _basket];
|
||||
_x action ["GetOut", _basket];
|
||||
sleep 0.1;
|
||||
_basket lock 0;
|
||||
[_x, _heli] remoteExec ["moveInCargo", _x];
|
||||
_x assignAsCargo _heli;
|
||||
};
|
||||
} forEach crew _basket;
|
||||
|
||||
ropeDestroy _rope;
|
||||
deleteVehicle _basket;
|
||||
_heli setVariable ["rescueseat", nil];
|
||||
@@ -29,6 +31,5 @@ if (_length <= 3.1) then {
|
||||
_heli vehicleChat "First Raise The Basket To Cabin Door";
|
||||
};
|
||||
|
||||
// Corte do Cabo
|
||||
// ropeCut [_heli getVariable "hoistrope", 0];
|
||||
// deleteVehicle (_heli getVariable "rescueseat");
|
||||
// deleteVehicle (_heli getVariable "rescueseat");
|
||||
|
||||
Reference in New Issue
Block a user