-
Content Count
2231 -
Joined
-
Last visited
-
Medals
Everything posted by shuko
-
The link in the starting post is always to the latest version. I've been currently too busy to work on this to figure out the MP lag and problem AI groups. SP should be ok at the moment still. Maybe ACE guys will release theirs before I get this done anyway. :P
-
What kind of traffic amounts does the server show with the #monitor command before and after/during fast-roping? PS. If someone is wondering, yes, I know the AI command is broken atm.
-
Ok, thanks. I'll try to think of something.
-
There's only one while-loop and it's not endless. :/ So, I don't have a clear idea what could cause it. Since the script is only loaded on players, the dedi doesn't even run the script. :/ Did you fast-rope with human players only or with AI, or will full AI groups?
-
1.30 Changed: Reverted back to free-fall descending instead of attached to rope Fixed: Only units in cargo can fast-rope. Now grouped AI pilot should not follow Added: Access level setting for tossing and cutting (for Moon_chilD) Added: Fail-safe to prevent units getting stuck at the lower end of the rope I've added an access level variable. You can change it in the script file or just overwrite it after you've included/loaded the script. Variable is called SHK_Fastrope_AccessLevel and levels are 0 = everyone (default), 1 = cargo only, 2 = pilots only. I changed back to the slowed free-fall method of descend. Should be smoother now again? However, with the Zeus problem I completely out of clue. The script really doesn't affect units at all, apart from the moment they are descending. Anyone, any ideas? Complaints/criticizing is fine, that's how improvements can be made. This script currently allows full AI group fast-roping as well as AI's in a player's group. Either way, only units in the cargo space can fast-rope. Yes it is. You can call the function with a group parameter or an array of units. grpAI call SHK_Fastrope_fnc_AIs; [unit1,unit2,unit3] call SHK_Fastrope_fnc_AIs;
-
Version 1.21 Fixed: ACE actions (thanks cyborg111) Added: Roof detection; detect end of rope instead of ground (for delta_actual)
-
The whole system works on actions, which naturally means they are local to the player. Making a server-sided system would be unnecessary complicated.
-
Yeah, currently it just checks with getposATL until unit is on the ground. Ideas how to detect roofs etc are welcome.
-
Ah, brain fart on my part. I'll fix it ASAP.
-
Go ahead. As I said, the original idea of this script isn't even mine. If you make an addon out of this, it would be a good example of the Arma community spirit. :)
-
Version 1.20 Added: Support for ACE interaction menu Added: AI groups can be fast-roped Changed: Descending code, now attached to rope instead of slowed free-fall Hopefully, I didn't break anything. If I did, please tell me!
-
Multiple lose with descriptions
shuko replied to thetrooper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
class CfgDebriefing { class Case1 { title = "Mission Failed"; subtitle = ""; description = "All players are dead."; pictureBackground = "loadScreen.paa"; picture = ""; pictureColor[] = {0.6,0.3,0.0,1}; }; class Case2 { title = "Mission Failed"; subtitle = ""; description = "All members of the SF team are dead."; pictureBackground = "loadScreen.paa"; picture = ""; pictureColor[] = {0.6,0.3,0.0,1}; }; class Case3 { title = "Mission Accomplished"; subtitle = ""; description = "Hostage was rescued."; pictureBackground = "loadScreen.paa"; picture = ""; pictureColor[] = {0.6,0.3,0.0,1}; }; class Case4 { title = "Mission Failed"; subtitle = ""; description = "Hostage died."; pictureBackground = "loadScreen.paa"; picture = ""; pictureColor[] = {0.6,0.3,0.0,1}; }; }; Calling end but using the case number. "Case1" call BIS_fnc_endMission; or "Case2" call BIS_fnc_endMission; and so on. I've never used the LOSER ending so I'm not sure if it has something that custom cases do not have. -
Added, thanks! Does anyone have rest of the RHS door names?
-
Basically yes. Or you can just get the new version.
-
Added, thanks again!
-
I can understand if #include doesn't work, but there has to be something really wrong if execvm from initplayerlocal doesn't work either. I really can't help much without the mission/init files. If I'd have to take a pure guess, I'd say you could be missing a semi-colon ( ;) from end of some line, which would prevent rest/other parts of the (init) script working. This fastrope script is very simple script really. All it does it create few global variables (functions) and then adds 3 actions to the player.
-
Thanks, added.
-
Then everyone would need to get the addon to play. ;) Anyway, as I said, I don't know how to make one. People are free to add the script to whatever addons they want.
-
Yes.
-
As was already mostly cleared by others. You can call this from init.sqf as well, as long as you wait for the client (human player's machine) to get control of the unit object he/she will play. In other words, player object/command can be null for a moment in init.sqf. So, calling this script from initPlayerLocal.sqf just avoids having to add something like: waituntil not isnull player It shouldn't make any difference from which of these files your scripts are called, apart from the obvious fact that the player.sqf is not run on the server. Though, I assume it will be run on a listen/hosted server for the hosting player as well, but not on dedicated server.
-
I've never made any addons, and I don't even know how. I don't really see how it would much benefit of being an addon instead of a script.
-
As always, I'm eager to hear about any bugs as I haven't been able to heavily test it in MP. Other suggestions etc are welcome as well.
-
Helicopter fastrope script
shuko replied to zealot111's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I haven't made any example mission. ;) Well, not until now. If you guys don't mind, let's continue this discussion/testing in here so we can avoid further and unnecessary confusion. -
Helicopter fastrope script
shuko replied to zealot111's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Calling out for brave testers. :P /* SHK_Fastrope by Shuko (LDD Kyllikki) Version 1.0 Inspired by v1g Fast Rope by [STELS]Zealot (modified by TheRick for Altis Life) */ #define MAX_ALTITUDE_ROPES_AVAIL 70 #define MIN_ALTITUDE_ROPES_AVAIL 5 #define MAX_SPEED_ROPES_AVAIL 50 #define STR_TOSS_ROPES "Toss Ropes" #define STR_FAST_ROPE "Fast Rope" #define STR_CUT_ROPES "Cut Ropes" #define STR_JOIN_QUEUE_HINT "You're in the fast-rope queue." // ["ClassName",["Door_L","Door_R"],[[ropeAttachPosition1],[ropeAttachPosition2]]] // Search for the chopper type is done from top to bottom. You can use vehicle base classes, // but specific vehicles should be at the top because first match is used (which could be base class and not the subclass). SHK_Fastrope_Helis = [ // RHS: Armed Forces of Russian Federation ["RHS_Mi8_base",[],[[0,-3,0]]], ["RHS_Mi24_base",[],[[1.6,3.3,0],[-0.4,3.3,0]]], ["RHS_Ka60_grey",[],[[1.4,1.35,0],[-1.4,1.35,0]]], //RHS: United States Armed Forces ["RHS_CH_47F_base",[],[[0,-0.4,0]]], ["RHS_UH60_base",[],[[1.44,1.93,-0.49]]], ["RHS_UH1_base",[],[[0.95,3,-0.9],[-0.95,3,-0.9]]], // Arma 3 ["Heli_Light_01_unarmed_base_F",[],[[1.1,0.5,-0.5],[-1.1,0.5,-0.5]]], //Hummingbird ["Heli_Transport_01_base_F",["door_L","door_R"],[[-1.01,2.5,0.25],[1.13,2.5,0.25]]], //Ghost Hawk ["Heli_Transport_03_base_F",["Door_rear_source"],[[-1.35,-4.6,-0.5],[1.24,-4.6,-0.5]]], //Huron Side doors: "Door_L_source","Door_R_source" ["I_Heli_Transport_02_F",["CargoRamp_Open"],[[0,-5,0]]], //Mohawk ["Heli_light_03_base_F",[],[[0.95,3,-0.9],[-0.95,3,-0.9]]], //Hellcat ["Heli_Attack_02_base_F",["door_L","door_R"],[[1.3,1.3,-0.6],[-1.3,1.3,-0.6]]], //Kajman ["Heli_Light_02_base_F",[],[[1.35,1.35,0],[-1.45,1.35,0]]], //Orca ["O_Heli_Transport_04_covered_F",["Door_4_source","Door_5_source"],[[1.3,1.3,-0.1],[-1.5,1.3,-0.1]]], //Taru covered ["O_Heli_Transport_04_bench_F",["Door_4_source","Door_5_source"],[[1.3,0.15,-0.1],[-1.5,0.15,-0.1]]] //Taru bench underneath ]; // Check if the player is allowed to drop the ropes SHK_Fastrope_fnc_canCreate = { private ["_heli","_alt","_flag"]; _heli = objectParent player; _alt = (getPosATL (_heli) select 2); _flag = (_alt < MAX_ALTITUDE_ROPES_AVAIL) && (_alt > MIN_ALTITUDE_ROPES_AVAIL) && ((abs (speed _heli)) < MAX_SPEED_ROPES_AVAIL) && (count (_heli getVariable ["SHK_Fastrope_Ropes",[]]) == 0) && (_heli getCargoIndex player >= 0); _flag }; SHK_Fastrope_fnc_createRopes = { params ["_heli","_ropesPos","_ropesObj","_rope"]; _heli = objectParent player; _ropesPos = _heli getVariable ["SHK_Fastrope_Ropes",[]]; // Ropes already exist if (count _ropesPos > 0) exitWith {}; { if (_heli isKindOf (_x select 0)) exitWith { // Open doors { _heli animateDoor [_x,1]; } forEach (_x select 1); // Rope attach positions _ropesPos = (_x select 2); }; } forEach SHK_Fastrope_Helis; // Create ropes _ropesObj = []; { _rope = ropeCreate [_heli, _x, (getPosATL player select 2) + 3]; _ropesObj pushBack _rope; } forEach _ropesPos; _heli setVariable ["SHK_Fastrope_Ropes", _ropesObj, true]; _heli setVariable ["SHK_Fastrope_Queue", [], true]; // Destroy ropes if chopper moves too fast _heli spawn { params ["_heli","_ropes"]; waitUntil {_ropes = (_heli getVariable ["SHK_Fastrope_Ropes",[]]); abs (speed _heli) > MAX_SPEED_ROPES_AVAIL || (count _ropes == 0)}; // Ropes already removed by call from addAction if (count _ropes > 0) then { _heli call SHK_Fastrope_fnc_cutRopes; }; }; }; SHK_Fastrope_fnc_cutRopes = { private ["_heli","_ropes"]; _heli = _this; // Function is called from addAction without helicopter parameter, use the chopper player is in. if (_this isEqualType []) then { _heli = objectParent player; }; _ropes = _heli getVariable ["SHK_Fastrope_Ropes",[]]; { ropeCut [_x,0]; } forEach _ropes; _heli setVariable ["SHK_Fastrope_Ropes", [], true]; _heli setVariable ["SHK_Fastrope_Queue", [], true]; // Close doors { if (_heli isKindOf (_x select 0)) exitWith { { _heli animateDoor [_x,0]; } forEach (_x select 1); }; } forEach SHK_Fastrope_Helis; }; SHK_Fastrope_fnc_fastRope = { params ["_unit","_rope"]; [_unit,_rope] spawn { // Wait for the unit to be move out of the chopper. params ["_unit","_rope","_ropePos","_heli"]; _heli = objectParent _unit; waitUntil {isNull objectParent _unit}; if (local _unit) then { _unit allowDamage false; _unit leaveVehicle _heli; _ropePos = (ropeEndPosition _rope) select 0; _unit setPosATL [(_ropePos select 0),(_ropePos select 1),(_ropePos select 2)-2]; _unit switchMove "LadderRifleStatic"; _unit setDir ([_heli,_unit] call BIS_fnc_dirTo); //_unit setDir (_unit getDir _heli); // Arma 3 version 1.55+ _unit spawn { params ["_unit"]; while {alive _unit && (((getPos _unit) select 2) > 1.5)} do { _unit setVelocity [0,0,-8]; }; _unit setVelocity [0,0,0]; _unit playMove "LadderRifleDownOff"; _unit allowDamage true; }; }; }; moveOut _unit; sleep 1.3; }; SHK_Fastrope_fnc_processQueue = { params ["_heli","_queue","_ropes","_count","_rope",["_i",0]]; _heli = objectParent player; _queue = _heli getVariable ["SHK_Fastrope_Queue",[]]; _ropes = _heli getVariable ["SHK_Fastrope_Ropes",[]]; _count = count _ropes; waitUntil {_queue find player == 0}; hintSilent ""; { // Player or an AI in player's group if (_x == player || (group _x == group player && !isPlayer _x)) then { _queue = _queue - [_x]; if (_count > 0) then { if (_count == 2) then { _rope = _ropes select _i; if (_i == 0) then { _i = 1 } else { _i = 0 }; } else { _rope = _ropes select 0; }; [_x,_rope] call SHK_Fastrope_fnc_fastRope; }; }; } forEach _queue; _heli setVariable ["SHK_Fastrope_Queue", _queue, true]; }; SHK_Fastrope_fnc_queueUp = { params ["_heli","_queue"]; _heli = objectParent player; _queue = _heli getVariable ["SHK_Fastrope_Queue",[]]; _queue pushBack player; hintSilent STR_JOIN_QUEUE_HINT; // If the player is a group leader, queue up his subordinate AIs if (player == leader group player) then { { if (!isPlayer _x && vehicle _x == vehicle player) then { _queue pushBack _x; }; } forEach (units group player); }; _heli setVariable ["SHK_Fastrope_Queue", _queue, true]; _heli spawn SHK_Fastrope_fnc_processQueue; }; player addAction["<t color='#ffff00'>"+STR_TOSS_ROPES+"</t>", SHK_Fastrope_fnc_createRopes, [], -1, false, false, '','call SHK_Fastrope_fnc_canCreate']; player addAction["<t color='#ff0000'>"+STR_CUT_ROPES+"</t>", SHK_Fastrope_fnc_cutRopes, [], -1, false, false, '','count (objectParent player getVariable ["SHK_Fastrope_Ropes",[]]) > 0']; player addAction["<t color='#00ff00'>"+STR_FAST_ROPE+"</t>", SHK_Fastrope_fnc_queueUp, [], 15, false, false, '','!(player in (objectParent player getVariable ["SHK_Fastrope_Queue",[]])) && (count (objectParent player getVariable ["SHK_Fastrope_Ropes",[]]) > 0) && ((getPosATL (objectParent player) select 2) < MAX_ALTITUDE_ROPES_AVAIL)']; -
Helicopter fastrope script
shuko replied to zealot111's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Both of these are (should be) fixed in the current version. I haven't had a chance to test it out with multiple players, just a quick solo test on dedi. I also added RHS choppers. I changed the class name handling so that it supports base classes as well. That way you don't need to list huge number of different variants. I guess I could release it when I get home. At least that way finding out bugs would be faster. ;)