2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-03-05 19:25:35 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Waypoint function for the fast rope waypoint.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Group <GROUP>
|
|
|
|
* 1: Waypoint position <ARRAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2017-09-19 20:38:49 +00:00
|
|
|
* true <BOOL>
|
2016-03-05 19:25:35 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2020-04-25 06:41:45 +00:00
|
|
|
* [_group, [6560, 12390, 0]] call ace_fastroping_fnc_deployAIWaypoint
|
2016-03-05 19:25:35 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
params [["_group", grpNull, [grpNull]], ["_position", [0, 0, 0], [[]], 3]];
|
|
|
|
|
2017-09-19 20:38:49 +00:00
|
|
|
private _vehicle = vehicle leader _group;
|
|
|
|
private _commander = effectiveCommander _vehicle;
|
|
|
|
private _speedMode = speedMode _group;
|
2016-03-05 19:25:35 +00:00
|
|
|
|
|
|
|
// - Approach -----------------------------------------------------------------
|
|
|
|
if (_vehicle distance2D _position > 50) then {
|
|
|
|
_group setSpeedMode "LIMITED";
|
|
|
|
_vehicle flyInHeight 20;
|
|
|
|
_commander doMove _position;
|
|
|
|
waitUntil {_vehicle distance2D _position < 50};
|
|
|
|
waitUntil {vectorMagnitude (velocity _vehicle) < 3};
|
|
|
|
//doStop _commander;
|
|
|
|
};
|
|
|
|
|
|
|
|
// - Deployment ---------------------------------------------------------------
|
|
|
|
[_vehicle] call FUNC(deployAI);
|
2021-02-27 17:05:05 +00:00
|
|
|
waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isNotEqualTo []};
|
2016-03-05 19:25:35 +00:00
|
|
|
waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []};
|
|
|
|
_group setSpeedMode _speedMode;
|
|
|
|
|
|
|
|
true
|