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:
|
2018-01-17 11:36:10 +00:00
|
|
|
* true
|
2016-03-05 19:25:35 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [_group, [6560, 12390, 0]] call ace_fastroping_fnc_deployAIWayoint
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params [["_group", grpNull, [grpNull]], ["_position", [0, 0, 0], [[]], 3]];
|
|
|
|
private ["_vehicle", "_commander", "_speedMode"];
|
|
|
|
|
|
|
|
_vehicle = vehicle leader _group;
|
|
|
|
_commander = effectiveCommander _vehicle;
|
|
|
|
_speedMode = speedMode _group;
|
|
|
|
|
|
|
|
// - 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);
|
|
|
|
waitUntil {!((_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo [])};
|
|
|
|
waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []};
|
|
|
|
_group setSpeedMode _speedMode;
|
|
|
|
|
|
|
|
true
|