Jump to content

Recommended Posts

CAD350F3E6A80E6D57CAD779D7EA8750EDE707BB

Fulton Recovery is a mod to enable a fulton recovery like in MGSV for units and vehicles.

Download: Fulton Recovery

Steam: Fulton Recovery

How the addon works

1. At missionstart sleep 3 secons and Check all units/vehicles if anybody has the special variable assigned mdhFulton

2a. if variable not assigned, add fulton actionmenu entry to all units/vehicles

2b. if variable is assigned, add fulton actionmenu entry only to units with assigned variable

3. sleep 5 seconds and start check from beginning

What happens to the fulton recovered unit/vehicle

the unit/vehicle gets lifted to 4.000 meter and then deleted

How to use it:

Variant A: only load the addon and play -> all units/vehicles have fulton action

Variant B: set the special variable ( this setVariable [ "mdhFulton" , ["actionTitle"] ] ) to any unit/vehicle -> specific units will have fulton action

Features

- Attach Fulton Recovery device to units and vehicles

- ability to enable Fulton Recovery only for specific units

- now MP-compatible

- added parachute for other players which get fulton recovered

Known issues

- dead units don't get correct attached to the parachute, i think it's an engine related problem

To activate Fulton Recovery to some specific units only, put the following into the initfield of the units:

this setVariable [ "mdhFulton" , [] ]

or

this setVariable [ "mdhFulton" , ["actionTitle"] ]

or

this setVariable [ "mdhFulton" , ["actionTitle",5] ]

or

this setVariable [ "mdhFulton" , ["actionTitle",5,"setThisVarTrueWhenFulton"] ]

Whole Mod as Script Version:

///////////////////////////////////////////////////////////////////////////////////////////////////
// FULTON RECOVERY MOD
// MADE BY MOERDERHOSCHI
// ARMED-ASSAULT.DE
// 08.2016
///////////////////////////////////////////////////////////////////////////////////////////////////
0 = [] spawn
{
	if (isDedicated) exitWith {};
	waitUntil {sleep 1; !(isNull player)};
	waitUntil {sleep 1; player == player};
	
	///////////////////////////////////////////////////////////////////////////////////////////////////
	// DIARYRECORD
	///////////////////////////////////////////////////////////////////////////////////////////////////
	_diary =
	{
		if (isNull player) exitWith {false};
		if(!(player diarySubjectExists "mdhFulton")) then
		{
			player createDiarySubject ["mdhFulton","FultonRecovery"];
			player createDiaryRecord
			[
				"mdhFulton",
				[
					"Fulton Recovery by Moerderhoschi",
					(
						'<br/>Fulton Recovery is a mod, created by Moerderhoschi for Arma III, to enable a fulton recovery like in MGSV for units and vehicles. '
					  + 'If you have any question you can contact me at the official Bohemia Interactive Forum: forums.bistudio.com<br/>'
					  + '<br/>'
					  + 'To activate Fulton Recovery to some specific units only, put the following into the initfield of the units:<br/>'
					  + '<br/>'
					  + 'this setVariable [ "mdhFulton" , [] ]<br/>'
					  + 'or<br/>'
					  + 'this setVariable [ "mdhFulton" , ["actionTitle"] ]<br/>'
					  + 'or<br/>'
					  + 'this setVariable [ "mdhFulton" , ["actionTitle",5] ]<br/>'
					  + 'or<br/>'
					  + 'this setVariable [ "mdhFulton" , ["actionTitle",5,"setThisVarTrueWhenFulton"] ]<br/>'
					  + '<br/>'
					  + '<img image="mdhFulton\fulton.paa"/>'
					  + '<br/>'
					  + 'Credits and Thanks:<br/>'
					  + 'Robert Edison Fulton, Jr. for the developement of Fulton system<br/>'
					  + 'Hideo Kojima - for the great idea to use the fulton recovery in MGSV<br/>'
					  + 'Armed-Assault.de Crew - For many great ArmA moments in many years<br/>'
					  + 'BIS - For ArmA3<br/>'
					)
				]
			]
		};
		true
	};
	
	///////////////////////////////////////////////////////
	// set fulton function
	///////////////////////////////////////////////////////
	_fulton =
	{
		_u = _this select 0; // object to fulton
		_t = _this select 1; // title
		_d = _this select 2; // duration
		_a = _this select 3; // var to set to true
	
		[
			_u,                                 // target: Object - Object the action is attached to 
			_t,                                 // title: String - Title of the action shown in the action menu
			"mdhFulton\fulton.paa",             // idleIcon: String - Idle icon shown on screen
			"mdhFulton\fulton.paa",             // progressIcon: String - Progress icon shown on screen
			("vehicle player == player " +      // condShow: String - Condition for the action to be shown. Special variables passed to the script code are _target (unit to which action is attached to) and _this (caller/executing unit)
			"&& {!(_target getVariable ['mdhFultonActive',false])}"),
			"true",                             // condProgress: String - Condition for the action to progress.If false is returned action progress is halted; arguments passed into it are: _target, _caller, _id, _arguments
			{},                                 // codeStart: Code - Code executed when action starts.
													// 0: Object - target (_this select 0) - the object which the action is assigned to
													// 1: Object - caller (_this select 1) - the unit that activated the action
													// 3: Number - ID (_this select 2) - ID of the activated action (same as ID returned by addAction)
													// 4: Array - arguments (_this select 3) - arguments given to the script if you are using the extended syntax	
			{},                           	    // codeProgress: Code - Code executed on every progress tick; arguments [target, caller, ID, arguments, currentProgress]; max progress is always 24
			{                                   // codeCompleted: Code - Code executed on completion; arguments [target, caller, ID, arguments]
				0 =
				[
					_this select 0,
					_this select 3
				]
				spawn
				{
					_u = _this select 0;
					_a = _this select 1 select 0;
					_u setVariable ["mdhFultonActive",true];
					_p = "B_Parachute_02_F" createVehicle getPos _u;
					_p setDir getDir _u;
					_p setPos getPos _u;
					_p attachTo [_u, getCenterOfMass _u ];
					sleep 4; 
					_v = 1;
					if (_a != "") then {call compile format [" %1 = true; publicVariable '%1' ",_a]};
					detach _p;
					_u attachTo [_p, [-(getCenterOfMass _u select 0),-(getCenterOfMass _u select 1),-(getCenterOfMass _u select 2)] ];
					_sleep = 0.02;
					_sPBT = 0;
					while {(getPos _p select 2) < 4000} do  
					{
						_p setVelocity [0,0,_v];
						if (_sPBT >= 1) then
						{
							[_p, 0, 0] call BIS_fnc_setPitchBank;
						};
						_v = _v + 1;
						_sPBT = _sPBT + _sleep;
						sleep _sleep;
					};
					detach _u;
					_u setVariable ["mdhFultonActive",nil];
					{_u deleteVehicleCrew _x} forEach crew _u;

					if (isPlayer _u) then
					{
						removeBackpackGlobal _u;
						_u addBackpackGlobal "B_Parachute";
					};

					deleteVehicle _p;
					deleteVehicle _u;					
				}; 
			},  
			{},                                 // codeInterupted: Code - Code executed on interrupted; arguments [target, caller, ID, arguments]
			[_a],                               // arguments: Array - Arguments passed to the scripts
			_d,                                 // duration: Number - Action duration; how much time it takes to complete the action
			-99,                                // priority: Number - Priority; actions are arranged in descending order according to this value
			false,                              // removeCompleted: BOOL - Remove on completion (default: true)
			false                               // showUncon: BOOL -Show in unconscious state (default: false)
		] call BIS_fnc_holdActionAdd;
	};
	
	///////////////////////////////////////////////////////
	// loop
	///////////////////////////////////////////////////////
	sleep 1;
	_mdhFultonAssignedExplicit = false;
	
	while {true} do
	{
		//systemChat (str(time) + " -- diary stuff");
		// diary stuff
		0 = _diary spawn
		{
			waitUntil {!(isNull player)};
			waitUntil {player==player};
			0 = [] call _this;
		};
	
		//systemChat (str(time) + " -- gather _list start");
		_list = vehicles;
		_list = _list + allUnits;
		_list = _list + allDead;
		//systemChat (str(time) + " -- gather _list end");
	
		//systemChat (str(time) + " -- chekFultonAssigned start");
		_mdhFultonAssignedExplicitCheck = ({"false" != str(_x getVariable ["mdhFulton",false])} count _list > 0);
		if (_mdhFultonAssignedExplicitCheck) then
		{
			_mdhFultonAssignedExplicit = true;
		};
		//systemChat (str(time) + " -- chekFultonAssigned end");
	
		//systemChat (str(time) + " -- go trough _list");
		{
			if (_mdhFultonAssignedExplicit) then
			{
				_mdhFultonAssigned = ("false" != str(_x getVariable ["mdhFulton",false]));
				_mdhFultonAlreadySet = (_x getVariable ["mdhFultonSet",false]);
				if (_mdhFultonAssigned && !_mdhFultonAlreadySet) then
				{
					_typeName = (typeName (_x getVariable ["mdhFulton",false]));
					if (_typeName == "ARRAY") then
					{
						_arr = (_x getVariable ["mdhFulton",false]);
						_w = "Fulton Recovery";
						_t = (if (count _arr > 0) then {if (typeName (_arr select 0) == "STRING") then {_arr select 0} else {_w}} else {_w}); // title
						_w = 5;
						_d = (if (count _arr > 1) then {if (typeName (_arr select 1) == "SCALAR") then {_arr select 1} else {_w}} else {_w}); // duration
						_w = "";
						_a = (if (count _arr > 2) then {if (typeName (_arr select 2) == "STRING") then {_arr select 2} else {_w}} else {_w}); // var to set to true

						_x setVariable ["mdhFultonSet",true];
						0 = [_x,_t,_d,_a] call _fulton;
					}
					else
					{
						systemChat
						(
							"mdhFulton false parameter set --> " + str(_x) + " --> falseParam: " + str(_x getVariable ["mdhFulton",false])
							+ ' --> correct Parameter format is ["actionTitle",5,"myVarToSetToTrueWhenFulton"]'
						);
						
					};
				};
			}
			else
			{
				_mdhFultonAlreadySet = (_x getVariable ["mdhFultonSet",false]);
				if (!_mdhFultonAlreadySet && _x != player) then
				{
					_x setVariable ["mdhFultonSet",true];
					0 = [_x,"Attach Fulton",5,""] call _fulton;
				};
			};
		} forEach _list;
	
		//systemChat (str(time) + " -- sleep 5");
		sleep (5 + random 1);
	};
};

Only the Part for one Specific Unit:

[
	TargetObjectName,                   // target: Object - Object the action is attached to 
	"Attach Fulton",                    // title: String - Title of the action shown in the action menu
	"",                                 // idleIcon: String - Idle icon shown on screen
	"",                                 // progressIcon: String - Progress icon shown on screen
	("vehicle player == player " +      // condShow: String - Condition for the action to be shown. Special variables passed to the script code are _target (unit to which action is attached to) and _this (caller/executing unit)
	"&& {!(_target getVariable ['mdhFultonActive',false])}"),
	"true",                             // condProgress: String - Condition for the action to progress.If false is returned action progress is halted; arguments passed into it are: _target, _caller, _id, _arguments
	{},                                 // codeStart: Code - Code executed when action starts.
											// 0: Object - target (_this select 0) - the object which the action is assigned to
											// 1: Object - caller (_this select 1) - the unit that activated the action
											// 3: Number - ID (_this select 2) - ID of the activated action (same as ID returned by addAction)
											// 4: Array - arguments (_this select 3) - arguments given to the script if you are using the extended syntax	
	{},                           	    // codeProgress: Code - Code executed on every progress tick; arguments [target, caller, ID, arguments, currentProgress]; max progress is always 24
	{                                   // codeCompleted: Code - Code executed on completion; arguments [target, caller, ID, arguments]
		0 =
		[
			_this select 0,
			_this select 3
		]
		spawn
		{
			_u = _this select 0;
			_a = _this select 1 select 0;
			_u setVariable ["mdhFultonActive",true];
			_p = "B_Parachute_02_F" createVehicle getPos _u;
			_p setDir getDir _u;
			_p setPos getPos _u;
			_p attachTo [_u, getCenterOfMass _u ];
			sleep 4; 
			_v = 1;
			if (_a != "") then {call compile format [" %1 = true; publicVariable '%1' ",_a]};
			detach _p;
			_u attachTo [_p, [-(getCenterOfMass _u select 0),-(getCenterOfMass _u select 1),-(getCenterOfMass _u select 2)] ];
			_sleep = 0.02;
			_sPBT = 0;
			while {(getPos _p select 2) < 4000} do  
			{
				_p setVelocity [0,0,_v];
				if (_sPBT >= 1) then
				{
					[_p, 0, 0] call BIS_fnc_setPitchBank;
				};
				_v = _v + 1;
				_sPBT = _sPBT + _sleep;
				sleep _sleep;
			};
			detach _u;
			_u setVariable ["mdhFultonActive",nil];
			{_u deleteVehicleCrew _x} forEach crew _u;

			if (isPlayer _u) then
			{
				removeBackpackGlobal _u;
				_u addBackpackGlobal "B_Parachute";
			};

			deleteVehicle _p;
			deleteVehicle _u;					
		}; 
	},  
	{},                                 // codeInterupted: Code - Code executed on interrupted; arguments [target, caller, ID, arguments]
	["setThisVarToTrueWhenFulton"],     // arguments: Array - Arguments passed to the scripts
	5,                                  // duration: Number - Action duration; how much time it takes to complete the action
	-99,                                // priority: Number - Priority; actions are arranged in descending order according to this value
	true,                               // removeCompleted: BOOL - Remove on completion (default: true)
	false                               // showUncon: BOOL -Show in unconscious state (default: false)
] call BIS_fnc_holdActionAdd;

Credits and Thanks:

Robert Edison Fulton, Jr. for the developement of Fulton system

Hideo Kojima - for the great idea to use the fulton recovery in MGSV

Armed-Assault.de Crew - For many great ArmA moments in many years

BIS - For ArmA3

updates:

v1.3

- added parachute to players which get fulton recovered

v1.2

- added MP-compatibility

- fulton action is now only available when player isn't in a vehicle

v1.1

- added signature files

regards

moerderhoschi

  • Like 7

Share this post


Link to post
Share on other sites

Sik! If you can be bothered a script version would be sweet for MP reasons, when the MP version is done

Share this post


Link to post
Share on other sites

@[FOXHOUND] Azza my first thought was a script version, but for usability reasons i decided to release it as addon. when i have implemented the mp-compatibility i will post the script version in the startpost ;)

Edit -> mp-compatibility added and new version released :)

Share this post


Link to post
Share on other sites

Heh, someone needs to create a new balloon model + animation. Then it's perfect.

Share this post


Link to post
Share on other sites

Da habe ich mal eine frage , in welchem Szenario soll man dies nutzen ?

Verstehe den genauern sinn darin nicht ?

there is no explicit idea to use this addon in a scenario. I had some fun in the editor, have made a addon an released it, thats all.

 

Mod version coming?

you can download the addon version on steam workshop or on my site, links in the first post.

Share this post


Link to post
Share on other sites

Updated mod v0.4 available at withSIX. Download now by clicking:

banner-420x120.png

Hey Moerderhoschi , you can upload updates or new mods to withSIX yourself now!

Make your own promo page, get the power to release your work at your own point of choosing.

To learn more, follow this guide.

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

×