Guest Posted July 3, 2016 Hi, here is My Tiny Fast Rope: (same code as is reply #18) Run it in init.sqf. if (hasInterface) then { waitUntil {player == player}; player addEventHandler ["GetOutMan",{ _veiculo = _this select 2; if (_veiculo isKindOf "Helicopter" && typeOf _veiculo != "O_Parachute_02_F") then { _vH = (position _veiculo) select 2; if (_vH > 5) then { cutText ["","BLACK FADED"]; _pPos = getPosATL player; player setPosATL (_pPos vectorAdd [0,0,1850]); BRPVP_fastRopeHeli = _veiculo; BRPVP_fastRopeAcaba = false; _nulo = _pPos spawn { player setPosATL _this; cutText ["","PLAIN"]; BRPVP_fastRopeRope = ropeCreate [BRPVP_fastRopeHeli,getCenterOfMass BRPVP_fastRopeHeli,player,[0,0,0.25],2.5]; _frKeysDEH = (findDisplay 46) displayAddEventHandler ["KeyUp",{ params ["_unused","_key","_keyShift","_keyCtrl","_keyAlt"]; _retorno = false; if (_key in [0x11,0x1F] && !_keyCtrl && !_keyAlt && ropeUnwound BRPVP_fastRopeRope) then { _retorno = true; _frTamAdic = 2; if (_keyShift) then {_frTamAdic = 5;}; if (_key == 0x11) then {_frTamAdic = -_frTamAdic;}; BRPVP_fastRopeEnrola = [BRPVP_fastRopeRope,_frTamAdic]; publicVariable "BRPVP_fastRopeEnrola"; ropeUnwind [BRPVP_fastRopeRope,5,(((ropeLength BRPVP_fastRopeRope) + _frTamAdic) max 2.5) min 50]; }; if (_key == 0x39 && !_keyShift && !_keyCtrl && !_keyAlt) then { _retorno = true; ropeDestroy BRPVP_fastRopeRope; BRPVP_fastRopeAcaba = true; }; if (_key == 0xD3 && !_keyShift && !_keyCtrl && !_keyAlt) then { _retorno = true; if (ropeLength BRPVP_fastRopeRope < 3.5) then { ropeDestroy BRPVP_fastRopeRope; player moveInCargo BRPVP_fastRopeHeli; BRPVP_fastRopeAcaba = true; }; }; _retorno }]; waitUntil {(getPos player) select 2 < 1 || !alive player || !alive BRPVP_fastRopeHeli || player != vehicle player || BRPVP_fastRopeAcaba}; (findDisplay 46) displayRemoveEventHandler ["KeyUp",_frKeysDEH]; ropeDestroy BRPVP_fastRopeRope; BRPVP_fastRopeAcaba = true; }; }; }; }]; "BRPVP_fastRopeEnrola" addPublicVariableEventHandler { (_this select 1) params ["_corda","_step"]; ropeUnwind [_corda,5,(((ropeLength _corda) + _step) max 2.5) min 50]; }; }; USAGE: Activate it by ejecting from a heli above 5 m in the air: to descend (one press to one step down) [W] to ascend (one press to one step up)[sHIFT] modifier for faster movement[sPACE BAR] to jump,[DEL] to back to the heli (you must be near it) Share this post Link to post Share on other sites
POLPOX 779 Posted July 3, 2016 Looks awesome script, and I tested few times but I couldn't find wrong... Share this post Link to post Share on other sites
maihym 12 Posted July 3, 2016 This script looks really good and I tested it but for some reason the rope didn't unwind for me. Is that the issue you're talking about? Share this post Link to post Share on other sites
f2k sel 164 Posted July 3, 2016 As maihym mentions it doesn't really work as posted has no effect. Not following fully but I think there is an issue here :- if (_keyShift) then {_frAdd = 4;_frVel = 6}; _change = _frAdd * _frDir; isn't the rope only ever going to be 4 meters long as multiplying it by _frdir which is either 1,0 or -1 will have little or no effect. Maybe it should be _frVel that would give it a maximum of 24 meters only. I tried this _change = _frAdd * 13; however pressing made the player descend but stopped short, I then had to press shift to reach the end of the rope. The player only ever got unattached when on the ground for me. Share this post Link to post Share on other sites
Guest Posted July 3, 2016 Hi,Thankyou for the replyes.maihym, i fixed the problem, see bellow, thanks for your reply. I changed this: ropeUnwind [BRPVP_fastRopeRope,_frVel,_change]; to this: ropeUnwind [BRPVP_fastRopeRope,_frVel,_change,true]; This "true" use relative values, so it will work as intended. Share this post Link to post Share on other sites
Guest Posted July 3, 2016 f2k sel, Thankyou for the info, for me the player gets unatached when the rope reachs 25 meters. Have you tried to fly high (like 70 m above ground) and unwind the rope to it maximum (50 m)? Share this post Link to post Share on other sites
f2k sel 164 Posted July 3, 2016 I checked the heli's height and it was about 65 meters, I'm not at my pc right now so I can't check the exact length of the rope but I did get the max length of rope message. Just had a chance to test it now and that is working for me now. Pressing gives 2meter drop and shift gives 4 meter drop. Rope reaches 50 meters and player remains connected until I press space or it gets close to the ground. Share this post Link to post Share on other sites
Guest Posted July 3, 2016 Amazingsome! So it worked well! I have no clue why it does not go for more than 25 m in my dedicated... but i will discovery. Share this post Link to post Share on other sites
maihym 12 Posted July 4, 2016 Dude I love your fast roping script. Would you mind if I used it on my server? Share this post Link to post Share on other sites
maihym 12 Posted July 4, 2016 Yes, you can use it! Awesome, thanks man, great work. Share this post Link to post Share on other sites
Guest Posted July 5, 2016 You guys are not using it in a dedicated server, right? I believe dedicated is the problem i'm having. Share this post Link to post Share on other sites
KevsNoTrev 44 Posted July 5, 2016 If issue is on dedicated it's due to using 'player'. Where is this being run from. I guess init.sqf Put this in the initplayerlocal.sqf Try also waituntil {!isnull (finddisplay 46)} before your display event handler _frKeysDEH Share this post Link to post Share on other sites
Guest Posted July 5, 2016 Thanks KevNoTrevs, I will try that. The script works but when the rope reachs 25 m player get disconected from it and falls. Its supposed to go to 50 m and stop, not disconnect player. Share this post Link to post Share on other sites
Guest Posted July 5, 2016 I did a small aestetic change on the script. _attachPos = [0,0,1]; if (getPosATL player select 2 > 100) then {_attachPos = [0,0,0.25];}; BRPVP_fastRopeRope = ropeCreate [_vehicle,getCenterOfMass _vehicle,player,_attachPos,2.5]; Share this post Link to post Share on other sites
maihym 12 Posted July 5, 2016 I did a small aestetic change on the script. _attachPos = [0,0,1]; if (getPosATL player select 2 > 100) then {_attachPos = [0,0,0.25];}; BRPVP_fastRopeRope = ropeCreate [_vehicle,getCenterOfMass _vehicle,player,_attachPos,2.5]; Why did you add this in? Share this post Link to post Share on other sites
Guest Posted July 5, 2016 maihym,If the heli is bellow 100 m, the player will fast rope in stand position, otherwise he will be in fall position (something like prone).This code will attach the rope to the middle of the player in the two different situations.NEWS!I found that the function ropeUnWind have local effect, this is probably the source of the problem i'm having. The rope is unwinded only in my client, and get stretched on the other clients. This stretch make it "die". The script have a new version, nothing special, but i will share later. Share this post Link to post Share on other sites
Guest Posted July 5, 2016 I did some last seconds changes :lol2: so if someone test it please return. Some important details improvement. Hope it not missed the Tiny thing. Tiny is always better, everyone know! :D player addEventHandler ["GetOutMan",{ _veiculo = _this select 2; if (_veiculo isKindOf "Helicopter" && typeOf _veiculo != "O_Parachute_02_F") then { _vH = (position _veiculo) select 2; if (_vH > 5) then { cutText ["","BLACK FADED"]; _pPos = getPosATL player; player setPosATL (_pPos vectorAdd [0,0,1850]); BRPVP_fastRopeHeli = _veiculo; BRPVP_fastRopeAcaba = false; _nulo = _pPos spawn { player setPosATL _this; cutText ["","PLAIN"]; BRPVP_fastRopeRope = ropeCreate [BRPVP_fastRopeHeli,getCenterOfMass BRPVP_fastRopeHeli,player,[0,0,0.25],2.5]; _frKeysDEH = (findDisplay 46) displayAddEventHandler ["KeyUp",{ params ["_unused","_key","_keyShift","_keyCtrl","_keyAlt"]; _retorno = false; if (_key in [0x11,0x1F] && !_keyCtrl && !_keyAlt && ropeUnwound BRPVP_fastRopeRope) then { _retorno = true; _frTamAdic = 2; if (_keyShift) then {_frTamAdic = 5;}; if (_key == 0x11) then {_frTamAdic = -_frTamAdic;}; BRPVP_fastRopeEnrola = [BRPVP_fastRopeRope,_frTamAdic]; publicVariable "BRPVP_fastRopeEnrola"; ropeUnwind [BRPVP_fastRopeRope,5,(((ropeLength BRPVP_fastRopeRope) + _frTamAdic) max 2.5) min 50]; }; if (_key == 0x39 && !_keyShift && !_keyCtrl && !_keyAlt) then { _retorno = true; ropeDestroy BRPVP_fastRopeRope; BRPVP_fastRopeAcaba = true; }; if (_key == 0xD3 && !_keyShift && !_keyCtrl && !_keyAlt) then { _retorno = true; if (ropeLength BRPVP_fastRopeRope < 3.5) then { ropeDestroy BRPVP_fastRopeRope; player moveInCargo BRPVP_fastRopeHeli; BRPVP_fastRopeAcaba = true; }; }; _retorno }]; waitUntil {(getPos player) select 2 < 1 || !alive player || !alive BRPVP_fastRopeHeli || player != vehicle player || BRPVP_fastRopeAcaba}; (findDisplay 46) displayRemoveEventHandler ["KeyUp",_frKeysDEH]; ropeDestroy BRPVP_fastRopeRope; BRPVP_fastRopeAcaba = true; }; }; }; }]; "BRPVP_fastRopeEnrola" addPublicVariableEventHandler { (_this select 1) params ["_corda","_step"]; ropeUnwind [_corda,5,(((ropeLength _corda) + _step) max 2.5) min 50]; }; Share this post Link to post Share on other sites
maihym 12 Posted July 5, 2016 I did some last seconds changes :lol2: so if someone test it please return. Some important details improvement. Hope it not missed the Tiny thing. Tiny is always better, everyone know Har ! :D player addEventHandler ["GetOutMan",{ _veiculo = _this select 2; if (_veiculo isKindOf "Helicopter" && typeOf _veiculo != "O_Parachute_02_F") then { _vH = (position _veiculo) select 2; if (_vH > 5) then { cutText ["","BLACK FADED"]; _pPos = getPosATL player; player setPosATL (_pPos vectorAdd [0,0,1850]); BRPVP_fastRopeHeli = _veiculo; BRPVP_fastRopeAcaba = false; _nulo = _pPos spawn { player setPosATL _this; cutText ["","PLAIN"]; BRPVP_fastRopeRope = ropeCreate [BRPVP_fastRopeHeli,getCenterOfMass _veiculo,player,[0,0,0.25],2.5]; _frKeysDEH = (findDisplay 46) displayAddEventHandler ["KeyUp",{ params ["_unused","_key","_keyShift","_keyCtrl","_keyAlt"]; _retorno = false; if (_key in [0x11,0x1F] && !_keyCtrl && !_keyAlt && ropeUnwound BRPVP_fastRopeRope) then { _retorno = true; _frTamAdic = 2; if (_keyShift) then {_frTamAdic = 5;}; if (_key == 0x11) then {_frTamAdic = -_frTamAdic;}; BRPVP_fastRopeEnrola = [BRPVP_fastRopeRope,_frTamAdic]; publicVariable "BRPVP_fastRopeEnrola"; ropeUnwind [BRPVP_fastRopeRope,5,(((ropeLength BRPVP_fastRopeRope) + _frTamAdic) max 2.5) min 50]; }; if (_key == 0x39 && !_keyShift && !_keyCtrl && !_keyAlt) then { _retorno = true; ropeDestroy BRPVP_fastRopeRope; BRPVP_fastRopeAcaba = true; }; if (_key == 0xD3 && !_keyShift && !_keyCtrl && !_keyAlt) then { _retorno = true; if (ropeLength BRPVP_fastRopeRope < 3.5) then { ropeDestroy BRPVP_fastRopeRope; player moveInCargo BRPVP_fastRopeHeli; BRPVP_fastRopeAcaba = true; }; }; _retorno }]; waitUntil {(getPos player) select 2 < 1 || !alive player || !alive BRPVP_fastRopeHeli || player != vehicle player || BRPVP_fastRopeAcaba}; (findDisplay 46) displayRemoveEventHandler ["KeyUp",_frKeysDEH]; ropeDestroy BRPVP_fastRopeRope; BRPVP_fastRopeAcaba = true; }; }; }; }]; "BRPVP_fastRopeEnrola" addPublicVariableEventHandler { (_this select 1) params ["_corda","_step"]; ropeUnwind [_corda,5,(((ropeLength _corda) + _step) max 2.5) min 50]; }; Why did you change the variable names? Now it's in no longer in English haha Share this post Link to post Share on other sites
Guest Posted July 5, 2016 (edited) I can translate later, but i need a break now. Also, must be a way to exclude all parachutes from the script. On line 3 i exclude the one i use in my server, the others will fast rope you when you leave then lol. EDIT: Fixed an missing variable in the last script. Edited July 5, 2016 by Guest Share this post Link to post Share on other sites
maihym 12 Posted July 5, 2016 Also do you think you can make it so the whole rope gets unraveled instead of the player being on the end of it. Share this post Link to post Share on other sites
Noigel 3 Posted July 5, 2016 This is excellent! Stuff like this needs to be integrated into vanilla arma and you sir need a little compensation! Share this post Link to post Share on other sites
Jnr4817 215 Posted July 6, 2016 Where do I place this bit of code for it to work? Share this post Link to post Share on other sites
Guest Posted July 8, 2016 maihym, yes, can be done.Noigel, thanks a lot!Jnr4817, see post again for updated code and instructions. You put it in init.sqf. Share this post Link to post Share on other sites