Jump to content
zealot111

Helicopter fastrope script

Recommended Posts

I need some help please,

I've been trying to make this work with new air units I found here > http://www.armaholic.com/page.php?id=24845 the "fast rope" option doesnt show when I'm in the air. But it does when I use vanilla air units.

What can I do?

I answered this same question from you in the ALiVE thread. I don't know about the chinook but as a work around for the blackhawks I found using the same coordinates from the vanilla A3 transport chopper will at least work. It's not pretty though and I haven't played around with it enough to know exactly what changes need to be made to the coordinates to make it *perfect*. Change the appropriate section of the fast rope script so it looks like this and you will be able to fast rope "insert" from a blackhawk:

zlt_rope_helidata = 
[
[
	["O_Heli_Light_02_unarmed_F", "O_Heli_Light_02_F"],
	[1.35,1.35,-24.95],
	[-1.45,1.35,-24.95]
],
[
	["B_Heli_Transport_01_F", "B_Heli_Transport_01_camo_F"],
	[-1.11,2.5,-24.7],
	[1.11,2.5,-24.7]
],
[
	["O_Heli_Attack_02_F", "O_Heli_Attack_02_black_F"],
	[1.3,1.3,-25],
	[-1.3,1.3,-25]
],
[
	["I_Heli_Transport_02_F"],
	[0,-5,-26],
	[]
],	
[
	["B_Heli_Light_01_F"],
	[0.6,0.5,-25.9],
	[-0.8,0.5,-25.9]
],
[
	["UH60M"],
	[-1.11,2.5,-24.7],
	[1.11,2.5,-24.7]
]
];

Share this post


Link to post
Share on other sites

Before I have a go myself was just wondering if anyone has already setup fast ropes for the Independent WY-55 ??

Edit:

[

["I_Heli_light_03_F", "I_Heli_light_03_unarmed_F"],

[-0.95,3.0,-25.82],

[0.8,3.0,-25.82]

]

Edited by Ritter

Share this post


Link to post
Share on other sites

Could you add the ability to order AI under your command to Fast Rope? I have this installed on my BECTI Warfare server, and we love it. I'd like the ability to fast rope my squad into an AO, then stay on station for CAS, as opposed to having to fast rope with them to trigger their deployment.

Share this post


Link to post
Share on other sites

If the chopper is AI controlled he releases the ropes, let's about 1/2 of the units fastrope and then starts to move, resulting in falling units - this happens in the example mission too :/

Already tried things like heli1 disableAI "Move"; or heli1 disableAI "Anim"; it doesn't help

Share this post


Link to post
Share on other sites

I have tweaked the script for MP to prevent cargo/passengers from deploying/cutting the ropes ...

If someone wants the tweak, let me know.

Share this post


Link to post
Share on other sites
I have tweaked the script for MP to prevent cargo/passengers from deploying/cutting the ropes ...

If someone wants the tweak, let me know.

Do you mean I can't deploy from the cargo area? I always have AI pilot and am also trying to solve him leaving while half my squad are still on ropes

Share this post


Link to post
Share on other sites
If the chopper is AI controlled he releases the ropes, let's about 1/2 of the units fastrope and then starts to move, resulting in falling units - this happens in the example mission too :/

Already tried things like heli1 disableAI "Move"; or heli1 disableAI "Anim"; it doesn't help

The same here

Share this post


Link to post
Share on other sites
I answered this same question from you in the ALiVE thread. I don't know about the chinook but as a work around for the blackhawks I found using the same coordinates from the vanilla A3 transport chopper will at least work. It's not pretty though and I haven't played around with it enough to know exactly what changes need to be made to the coordinates to make it *perfect*. Change the appropriate section of the fast rope script so it looks like this and you will be able to fast rope "insert" from a blackhawk:

[

["UH60M"],

[-1.11,2.5,-24.7],

[1.11,2.5,-24.7]

]

The coordinate format is easy if you're at all familiar with using the attachTo command, which is what this is;

(I could be explaining it wrong, someone correct me if I am)

[X,Y,Z]

Look at it this way:

X is the Left/Right position if you lay the helicopter down flat on the ground and look at it from above. So modifying the first variable moves your item/object left or right.

Y is the lateral movement when looking at it the aircraft from the same position. So modifying the second value moves your object forward or backwards.

Z is your up/down from the object's center of mass/model/whatever.

Looking at the values presented it would seem that the rope is 24.7 (What measurement?) tall as it has been attached at a value of -24.7, meaning it's attach point is beneath the aircraft and the rope extends up from there. (Or the center of the rope could be it's reference point. I haven't actually played with this in the editor yet)

So if you wanted to adjust where the ropes attach to the aircraft you would simply adjust those three values. The first set appears to be the rope on the left side, the second set the right. (The negative first value denotes a shift to the left of center). So if they're too far out, change that -1.11 to a -1 or even a -0.9, -0.95 etc. Play with it until you've got it centered right where you want it.

So if you wanted to add custom vehicles (IE: The Chinook from the A2 Helo import pack or the UH-60's that come with it) then you would add it's classname as listed in the examples and then add in the rope attachTo coordinates, which is what was being explained.

The explination wasn't for you, Oktyabr, just for anyone who wants to expand on this script.

Share this post


Link to post
Share on other sites

How can I make the AI toss the rope when I get to my destination? Is there a command or action I can script?

This is a piece of our LZ/Insertion script. is there something like

uh80_alpha action ['autoHover', uh80_alpha];

Example:

		uh80_alpha land "GET OUT";
	uh80_alpha action ['autoHover', uh80_alpha];
	uh80_alpha animateDoor ["door_L",1]; 
	uh80_alpha animateDoor ["door_R",1];
	sleep 20;
	uh80_alpha action ['Toss Rope', uh80_alpha]; // <<< Is something like this possible?
	[["AirborneCommand",["Airborne Command", "Alpha - Greenlight - Good To Go"]], "BIS_fnc_showNotification", true, false] spawn BIS_fnc_MP; sleep 1;	
};

Share this post


Link to post
Share on other sites

Hey guys,

[

["B_Heli_Transport_03_F", "B_Heli_Transport_01_camo_F"],

[-1.11,-3.5,-24.9],

[1.08,-3.5,-24.9]

],

Gets the ropes in a pretty reasonable place for the Huron!

Enjoy

Share this post


Link to post
Share on other sites
Hey guys,

[

["B_Heli_Transport_03_F", "B_Heli_Transport_01_camo_F"],

[-1.11,-3.5,-24.9],

[1.08,-3.5,-24.9]

],

Gets the ropes in a pretty reasonable place for the Huron!

Enjoy

Small correction + addition for the taru transport (identical to huron) & hellcat

// chinook both versions

[

["B_Heli_Transport_03_F", "B_Heli_Transport_03_unarmed_F"],

[-1.11,-3.5,-24.9],

[1.08,-3.5,-24.9]

],

// hellcat green

[

["I_Heli_light_03_unarmed_F"],

[0.7,2.5,-24.9],

[-0.9,2.5,-24.9]

],

// taru transport (closed)

[

["O_Heli_Transport_04_covered_F"],

[-1.11,-3.5,-24.9],

[1.08,-3.5,-24.9]

],

Share this post


Link to post
Share on other sites
If the chopper is AI controlled he releases the ropes, let's about 1/2 of the units fastrope and then starts to move, resulting in falling units - this happens in the example mission too :/

Already tried things like heli1 disableAI "Move"; or heli1 disableAI "Anim"; it doesn't help

got this problem as well (using ALIVE choppers)

Edited by supergruntsb78

Share this post


Link to post
Share on other sites

I think I fixed the issue of falling units, the problem was that the units weren't unassigned from the chopper so the chopper goes crazy.

zlt_fnc_fastropeUnit = {
private ["_unit","_heli","_ropes","_rope","_zmax","_zdelta","_zc"];
_unit = _this;
_heli = vehicle _unit;
if (_unit == _heli) exitWith {};

_ropes = (_heli getvariable ["zlt_ropes", []]);
if (count _ropes == 0) exitwith {};

_rope = _ropes call BIS_fnc_selectRandom;
_zmax = 22;
_zdelta = 7 / 10  ;

_zc = _zmax;
unassignvehicle _unit; //****************** add this line to stop AI falling *************************
_unit action ["eject", _heli];
_unit switchmove "gunner_standup01";

_unit setpos [(getpos _unit select 0), (getpos _unit select 1), 0 max ((getpos _unit select 2) - 3)];
while {alive _unit and (getpos _unit select 2) > 1 and (abs (speed _heli)) < MAX_SPEED_WHILE_FASTROPING  and _zc > -24} do {
	_unit attachTo [_rope, [0,0,_zc]];
	_zc = _zc - _zdelta;
	sleep 0.1;
};
_unit switchmove "";
detach _unit;

};

Share this post


Link to post
Share on other sites

for HAFM NH90

[
 ["NH90Armed_GR2","NH90_GR2","NH90Armed_GR","NH90_AAF","NH90Armed_AAF","NH90Armed_GR2","NH90","NH90Armed","NH90_GR"],
 [0.6,-3.5,-25.5 ],
 [-0.6,-3.5,-25.5]
]

and for kyo_mh47e_a3 Chinooks

[
 ["kyo_MH47E_HC","kyo_MH47E_base","kyo_MH47E_Ramp"],
 [0,1.3,-27], //middle hatch,  or  [2,6.7,-24,5]  for side crane
 [0,-6,-25.1] //back door
]

edit: i see that if you change this line to

//_rope = createVehicle ["land_rope_f", [0,0,0], [], 0, "CAN_COLLIDE"];
 _rope = ropeCreate [_this, [0,0,0], 35]; //35 is the lenght of the rope

you can have the ropes with physics.

the problem is that the Z axis of the coords is differend (0 is the value for O_Heli_Light_02_unarmed_F), i thing because the pivot point of the ropes???

i make some testings and seems is working . can you check?

edit: after some tests i see that the Z value for all helis is 0 . (maybe needs some fine tuning)

Edited by dragonsyr

Share this post


Link to post
Share on other sites

for some reason I just cant this to work (it used to work for me though)

my init.sqf is

#ifndef execNow

#define execNow call compile preprocessfilelinenumbers

#endif

if (hasInterface) then {

private ["_cam","_camx","_camy","_camz","_object"];

titleText ["Opendome Studios presents...", "BLACK IN",9999];

waituntil {!(isnull player)};

sleep 2;

_object = player;

_camx = getposATL player select 0;

_camy = getposATL player select 1;

_camz = getposATL player select 2;

_cam = "camera" CamCreate [_camx -700 ,_camy + 700,_camz+100];

_cam CamSetTarget player;

_cam CameraEffect ["Internal","Back"];

_cam CamCommit 0;

_cam camsetpos [_camx -15 ,_camy + 15,_camz+3];

_cam CamCommit 30;

sleep 5;

titleText ["Operation STRANGEBREW", "BLACK IN",3];

sleep 25;

_cam CameraEffect ["Terminate","Back"];

CamDestroy _cam;

[] execVM "zlt_fastrope.sqf";

};

and my fast rope script looks like

// v1g Fast Rope by [sTELS]Zealot

#define MAX_SPEED_WHILE_FASTROPING 10

#define MAX_SPEED_ROPES_AVAIL 30

#define STR_TOSS_ROPES "Toss Ropes"

#define STR_FAST_ROPE "Fast Rope"

#define STR_CUT_ROPES "Cut Ropes"

if (isdedicated) exitwith {};

waituntil {player == player};

zlt_rope_ropes = [];

zlt_mutexAction = false;

zlt_rope_helis = ["O_Heli_Light_02_unarmed_F", "O_Heli_Light_02_F", "B_Heli_Transport_01_F", "B_Heli_Transport_01_camo_F", "RHS_UH60M", "RHS_UH60M_d", "CAF_CH146_F_D", "CAF_CH146_SF", "B_Heli_Transport_03_F", "B_Heli_Transport_03_unarmed_F", "CFB_Helo_Chinook", "I_Heli_light_03_unarmed_F", "CFB_Helo_Griffon_Unarmed", "O_Heli_Attack_02_F", "O_Heli_Attack_02_black_F", "I_Heli_Transport_02_F", "B_Heli_Light_01_F"];

zlt_rope_helidata =

[

[

["O_Heli_Light_02_unarmed_F", "O_Heli_Light_02_F"],

[1.35,1.35,-24.95],

[-1.45,1.35,-24.95]

],

[

["B_Heli_Transport_01_F", "B_Heli_Transport_01_camo_F", "RHS_UH60M", "RHS_UH60M_d", "CAF_CH146_F_D", "CAF_CH146_SF"],

[-1.11,2.5,-24.7],

[1.11,2.5,-24.7]

],

[

["B_Heli_Transport_03_F", "B_Heli_Transport_03_unarmed_F", "CFB_Helo_Chinook"],

[-1.11,-3.5,-24.9],

[1.08,-3.5,-24.9]

[,

[

["I_Heli_light_03_unarmed_F", "CFB_Helo_Griffon_Unarmed"],

[0.7,2.5,-24.9],

[-0.9,2.5,-24.9]

],

[

["O_Heli_Attack_02_F", "O_Heli_Attack_02_black_F"],

[1.3,1.3,-25],

[-1.3,1.3,-25]

],

[

["I_Heli_Transport_02_F"],

[0,-5,-26],

[]

],

[

["B_Heli_Light_01_F"],

[0.6,0.5,-25.9],

[-0.8,0.5,-25.9]

]

];

zlt_fnc_tossropes = {

private ["_heli","_ropes","_oropes","_rope"];

_heli = _this;

_ropes = [];

_oropes = _heli getvariable ["zlt_ropes",[]];

if (count _oropes != 0 ) exitwith {};

_i = 0;

{

if ((typeof _heli) in (_x select 0)) exitwith {

_ropes = _ropes + [_x select 1];

if ( count (_x select 2) !=0 ) then {

_ropes = _ropes + [_x select 2];

};

};

_i = _i +1;

} foreach zlt_rope_helidata;

sleep random 0.3;

if ( count (_heli getvariable ["zlt_ropes",[]]) != 0 ) exitwith { zlt_mutexAction = false; };

_heli animateDoor ['door_R', 1];

_heli animateDoor ['door_L', 1];

{

_rope = createVehicle ["land_rope_f", [0,0,0], [], 0, "CAN_COLLIDE"];

_rope setdir (getdir _heli);

_rope attachto [_heli, _x];

_oropes = _oropes + [_rope];

} foreach _ropes;

_heli setvariable ["zlt_ropes",_oropes,true];

_heli spawn {

private ["_heli","_ropes"];

_heli = _this;

while {alive _heli and count (_heli getvariable ["zlt_ropes", []]) != 0 and abs (speed _heli) < MAX_SPEED_ROPES_AVAIL } do {

sleep 0.3;

};

_ropes = (_heli getvariable ["zlt_ropes", []]);

{deletevehicle _x} foreach _ropes;

_heli setvariable ["zlt_ropes", [], true];

};

};

zlt_fnc_ropes_cond = {

_veh = vehicle player;

_flag = (_veh != player) and {(not zlt_mutexAction)} and {count (_veh getvariable ["zlt_ropes", []]) == 0} and { (typeof _veh) in zlt_rope_helis } and {alive player and alive _veh and (abs (speed _veh) < MAX_SPEED_ROPES_AVAIL ) };

_flag;

};

zlt_fnc_fastropeaiunits = {

private ["_heli","_grunits"];

diag_log ["zlt_fnc_fastropeaiunits", _this];

_heli = _this select 0;

_grunits = _this select 1;

dostop (driver _heli );

(driver _heli) setBehaviour "Careless";

(driver _heli) setCombatMode "Blue";

_heli spawn zlt_fnc_tossropes;

[_heli, _grunits] spawn {

private ["_units","_heli"];

sleep random 0.5;

_units = _this select 1;

_heli = (_this select 0);

_units = _units - [player];

_units = _units - [driver _heli];

{if (!alive _x or isplayer _x or vehicle _x != _heli) then {_units = _units - [_x];}; } foreach _units;

{ sleep (0.5 + random 0.7); _x spawn zlt_fnc_fastropeUnit; } foreach _units;

waituntil {sleep 0.5; { (getpos _x select 2) < 1 } count _units == count _units; };

sleep 10;

(driver _heli) doFollow (leader group (driver _heli ));

(driver _heli) setBehaviour "Aware";

(driver _heli) setCombatMode "White";

_heli call zlt_fnc_cutropes;

};

};

zlt_fnc_fastrope = {

diag_log ["fastrope", _this];

zlt_mutexAction = true;

sleep random 0.3;

if (player == leader group player) then {

[vehicle player, units group player] call zlt_fnc_fastropeaiunits;

};

player call zlt_fnc_fastropeUnit;

zlt_mutexAction = false;

};

zlt_fnc_fastropeUnit = {

private ["_unit","_heli","_ropes","_rope","_zmax","_zdelta","_zc"];

_unit = _this;

_heli = vehicle _unit;

if (_unit == _heli) exitWith {};

_ropes = (_heli getvariable ["zlt_ropes", []]);

if (count _ropes == 0) exitwith {};

_rope = _ropes call BIS_fnc_selectRandom;

_zmax = 22;

_zdelta = 7 / 10 ;

_zc = _zmax;

unassignvehicle _unit;

_unit action ["eject", _heli];

_unit switchmove "gunner_standup01";

_unit setpos [(getpos _unit select 0), (getpos _unit select 1), 0 max ((getpos _unit select 2) - 3)];

while {alive _unit and (getpos _unit select 2) > 1 and (abs (speed _heli)) < MAX_SPEED_WHILE_FASTROPING and _zc > -24} do {

_unit attachTo [_rope, [0,0,_zc]];

_zc = _zc - _zdelta;

sleep 0.1;

};

_unit switchmove "";

detach _unit;

};

zlt_fnc_cutropes = {

_veh = _this;

_ropes = (_veh getvariable ["zlt_ropes", []]);

{deletevehicle _x} foreach _ropes;

_veh setvariable ["zlt_ropes", [], true];

_veh animateDoor ['door_R', 0];

_veh animateDoor ['door_L', 0];

};

zlt_fnc_removeropes = {

(vehicle player) call zlt_fnc_cutropes;

};

zlt_fnc_createropes = {

zlt_mutexAction = true;

(vehicle player) call zlt_fnc_tossropes;

zlt_mutexAction = false;

};

player createDiarySubject [sTR_SCRIPTS_NAME,STR_SCRIPTS_NAME];

player createDiaryRecord [sTR_SCRIPTS_NAME,[sTR_SCRIPT_NAME, STR_HELP]];

player addAction["<t color='#ffff00'>"+STR_TOSS_ROPES+"</t>", zlt_fnc_createropes, [], -1, false, false, '','[] call zlt_fnc_ropes_cond'];

player addAction["<t color='#ff0000'>"+STR_CUT_ROPES+"</t>", zlt_fnc_removeropes, [], -1, false, false, '','not zlt_mutexAction and count ((vehicle player) getvariable ["zlt_ropes", []]) != 0'];

player addAction["<t color='#00ff00'>"+STR_FAST_ROPE+"</t>", zlt_fnc_fastrope, [], 15, false, false, '','not zlt_mutexAction and count ((vehicle player) getvariable ["zlt_ropes", []]) != 0 and player != driver vehicle player'];

player addEventHandler ["Respawn", {

player addAction["<t color='#ffff00'>"+STR_TOSS_ROPES+"</t>", zlt_fnc_createropes, [], -1, false, false, '','[] call zlt_fnc_ropes_cond'];

player addAction["<t color='#ff0000'>"+STR_CUT_ROPES+"</t>", zlt_fnc_removeropes, [], -1, false, false, '','not zlt_mutexAction and count ((vehicle player) getvariable ["zlt_ropes", []]) != 0'];

player addAction["<t color='#00ff00'>"+STR_FAST_ROPE+"</t>", zlt_fnc_fastrope, [], 15, false, false, '','not zlt_mutexAction and count ((vehicle player) getvariable ["zlt_ropes", []]) != 0 and player != driver vehicle player'];

}];

Share this post


Link to post
Share on other sites

["B_Heli_Transport_03_F", "B_Heli_Transport_03_unarmed_F", "CFB_Helo_Chinook"],

[-1.11,-3.5,-24.9],

[1.08,-3.5,-24.9]

[,

[

second to last [ is the wrong way around it should be

["B_Heli_Transport_03_F", "B_Heli_Transport_03_unarmed_F", "CFB_Helo_Chinook"],

[-1.11,-3.5,-24.9],

[1.08,-3.5,-24.9]

],

[

You may want to check RPT file or enable showscripterros .

Share this post


Link to post
Share on other sites

There may be a whole much of conflicts here but I'll lay out the situation

Zeus with @Ares... Using Zeus controlled helicopters... script applied... when using Zeus to control AI chopper, fast roping out, make it to ground not falling, Touch ground and DIE! All previous fixes to the script for AI issues have been applied but it's safe to say the helo is not moving prematurely because it just hovers over our dead bodies.

Only other issue I can think of is a conflict with SRS revive as we seem to respawn and die and then respawn.

Help!

Share this post


Link to post
Share on other sites

has anyone else the problem that the player who has slide the rope down will be teleported back into the heli again after a few seconds?

Share this post


Link to post
Share on other sites
for some reason I just cant this to work (it used to work for me though)

my init.sqf is

and my fast rope script looks like

Version Updated of this SCRIPT for ALIVE?

Opedone in your version missing this HELICOPTER ( i think of mod RHS ) :

CH 47 ;

KA 60 ;

MH9 HUMBIRD ;

M900 ;

MI24 V , P ;

MI8AMT ;

ORCA white and black ;

UH1Y "all" ;

UH 60 MEV ;

ESSS .

Edited by MasterAntony

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×