Jump to content
Sign in to follow this  
ringoray

Insurgency with heli lifting script in it?

Recommended Posts

Hey people. I am just posting this on the off chance that somebody might have what I am looking for. I am looking for an Insurgency 1.50 map that has any heli lifting script in it. I have tried to incorporate a few such scripts into Insurgency but with no luck at all. Error after error has made me lose the will to live lol. So here I am begging, hoping that somebody has such a mission that I could download, or have scripts I could add with a little guidance as to how to add them.

Thanks in advance for any help given.

Share this post


Link to post
Share on other sites

Cheers mate, I tried that script and again it gives error because of all the other scripts in insurgency clashing with it. When I change one error it just throws up another, and another, and another...so on and so on lol. Ill just keep working on it and see if I can fix it somehow.

Share this post


Link to post
Share on other sites
You can download 404Wasteland and see how [R3F] Artillery and Logistic is added and setted.

Cheers, will do, I'll let you know if I get it working and post how it works to help others.

Share this post


Link to post
Share on other sites

Well, I gave up on that idea, but, I came across a handy script on another insurgency server which allows vehicle lifting. Somehow the Helis will only lift vehicles like Hummers, SUVs and the like. I cannot get the helis to lift heavy amor vehicles. The SQF that allows what vehicles to be lifted is this. I have tried to add the armor classnames in various places but alas, no lift allowed.

INS_COMMON_PATH = "common\Lift\";

HTextRed = {"<t color='#f0ff0000'>" + _this + "</t>"};
HTextBlue = {"<t color='#f00000ff'>" + _this + "</t>"};

_vehicles_lift_list = [];
_vehicles_nolift_list = []; // unfortunately, all kinds of "wheeled_apc" are of type "cars" as well

_advtype_lift1 = ["ATV_US_EP1","MMT_Civ","M1030_US_DES_EP1"]; 
_advtype_lift2 = ["ATV_US_EP1","MMT_Civ","hilux1_civil_3_open_EP1","M1030_US_DES_EP1","HMMWV_M2","HMMWV_MK19","HMMWV_Ambulance_DES_EP1","Lada2_TK_CIV_EP1","HMMWV_M1151_M2_DES_EP1","HMMWV_M998A2_SOV_DES_EP1","M1126_ICV_mk19_EP1","M1126_ICV_M2_EP1","HMMWV_M1151_M2_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC","SUV_PMC_BAF","HMMWV_M998A2_SOV_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC"];
_advtype_lift3 = ["M1130_CV_EP1","ATV_US_EP1","MMT_Civ","hilux1_civil_3_open_EP1","M1030_US_DES_EP1","HMMWV_M2","HMMWV_MK19","HMMWV_Ambulance_DES_EP1","Lada2_TK_CIV_EP1","HMMWV_M1151_M2_DES_EP1","HMMWV_M998A2_SOV_DES_EP1","M1126_ICV_mk19_EP1","M1126_ICV_M2_EP1","HMMWV_M1151_M2_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC","SUV_PMC_BAF","HMMWV_M998A2_SOV_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC"];
_advtype_lift4 = ["M1130_CV_EP1","hilux1_civil_3_open_EP1","HMMWV_M2","HMMWV_MK19","HMMWV_Ambulance_DES_EP1","Lada2_TK_CIV_EP1","HMMWV_M1151_M2_DES_EP1","HMMWV_M998A2_SOV_DES_EP1","M1126_ICV_mk19_EP1","M1126_ICV_M2_EP1","HMMWV_M1151_M2_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC","SUV_PMC_BAF","HMMWV_M998A2_SOV_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC"];
_advtype_lift5 = ["ATV_US_EP1","MMT_Civ","hilux1_civil_3_open_EP1","M1030_US_DES_EP1","HMMWV_M2","HMMWV_MK19","HMMWV_Ambulance_DES_EP1","Lada2_TK_CIV_EP1","HMMWV_M1151_M2_DES_EP1","HMMWV_M998A2_SOV_DES_EP1","M1126_ICV_mk19_EP1","M1126_ICV_M2_EP1","HMMWV_M1151_M2_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC","SUV_PMC_BAF","HMMWV_M998A2_SOV_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC"];
_advtype_lift6 = [];
_advtype_lift7 = ["ATV_US_EP1","MMT_Civ","hilux1_civil_3_open_EP1","M1030_US_DES_EP1","HMMWV_M2","HMMWV_MK19","HMMWV_Ambulance_DES_EP1","Lada2_TK_CIV_EP1","HMMWV_M1151_M2_DES_EP1","HMMWV_M998A2_SOV_DES_EP1","M1126_ICV_mk19_EP1","M1126_ICV_M2_EP1","HMMWV_M1151_M2_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC","SUV_PMC_BAF","HMMWV_M998A2_SOV_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC"];

if(INS_AdvanceType == 1)then{_vehicles_lift_list = _advtype_lift1; _vehicles_nolift_list = ["M1130_CV_EP1"];} else {

if(INS_AdvanceType == 2)then{_vehicles_lift_list = _advtype_lift2; _vehicles_nolift_list = ["M1130_CV_EP1"];} else {

if(INS_AdvanceType == 3)then{_vehicles_lift_list = _advtype_lift3;} else {

if(INS_AdvanceType == 4)then{_vehicles_lift_list = _advtype_lift4;} else {

if(INS_AdvanceType == 5)then{_vehicles_lift_list = _advtype_lift5; _vehicles_nolift_list = ["M1130_CV_EP1"];} else {

if(INS_AdvanceType == 6)then{_vehicles_lift_list = _advtype_lift6; _vehicles_nolift_list = ["M1130_CV_EP1"];} else {

_vehicles_lift_list = _advtype_lift7; _vehicles_nolift_list = ["M1130_CV_EP1"];

}}}}}};

if ( not local player) exitWith {};
_vehicle = _this select 0;

Vehicle_Attached = false;
Vehicle_Released = false;
_menu_lift_shown = false;
vehicle_attached_list = [];
_nearest = objNull;
_id = -1;

sleep 0.1;

WaitUntil{(alive _vehicle) && (alive player) && (driver _vehicle == player)};
while {(alive _vehicle) && (alive player) && (driver _vehicle == player)} do {
if ((driver _vehicle) == player) then {
	_pos = getPos _vehicle;

	if (!Vehicle_Attached && (_pos select 2 > 2.5) && (_pos select 2 < 8)) then {
		_nearest = nearestObjects [_vehicle,["LandVehicle"],50];
		_nearest = if(count _nearest > 0) then {_nearest select 0} else {ObjNull};
		sleep 0.1;

		if (!(isNull _nearest) && {_nearest isKindOf _x} count _vehicles_lift_list > 0 && {_nearest isKindOf _x} count _vehicles_nolift_list == 0) then {
			_nearest_pos = getPos _nearest;
			_nx = _nearest_pos select 0;_ny = _nearest_pos select 1;_px = _pos select 0;_py = _pos select 1;
			if ((_px <= _nx + 6 && _px >= _nx - 6) && (_py <= _ny + 6 && _py >= _ny - 6)) then {
				if (!_menu_lift_shown) then {
					_id = _vehicle addAction ["Lift Vehicle" call HTextRed, (INS_COMMON_PATH+"heli_action.sqf")];
					_menu_lift_shown = true;
				};
			} else {
				_nearest = objNull;
				if (_menu_lift_shown) then {
					_vehicle removeAction _id;
					_menu_lift_shown = false;
				};
			};
		};
	} else {
		if (_menu_lift_shown) then {
			_vehicle removeAction _id;
			_menu_lift_shown = false;
		};

		sleep 0.1;

		if (isNull _nearest) then {
			Vehicle_Attached = false;
			Vehicle_Released = false;
		} else {
			if (Vehicle_Attached) then {
				_release_id = _vehicle addAction ["Drop Vehicle" call HTextBlue, (INS_COMMON_PATH+"heli_release.sqf")];
				vehicle_attached_list = vehicle_attached_list + [_nearest];

				_nearest attachTo [_vehicle,[-1,0,-8]];
				_nearest engineOn false;
				while {!Vehicle_Released && alive _vehicle && alive _nearest && alive player && (driver _vehicle == player)} do {sleep 1};
				detach _nearest;

				Vehicle_Attached = false;
				Vehicle_Released = false;

				vehicle_attached_list = vehicle_attached_list - [_nearest];

				if (!alive _vehicle) then {
					_vehicle removeAction _release_id;
				} else {
				};

				waitUntil {(getPos _nearest) select 2 < 10};

				_npos = getPos _nearest;
				_nearest setPos [_npos select 0, _npos select 1, 0];

				sleep 1.012;
			};
		};
	};
};
sleep 0.51;
};

if (!(alive _vehicle) || !(alive player)) then {
_vehicle removeAction vec_id;
};

if (true) exitWith {};

Edited by ringoray

Share this post


Link to post
Share on other sites

That looks like Xeno's lift suite. Are you using the mission you downloaded from the server, or are you adding this script suite to your own mission? I ask because it uses a global defined in defines.sqf and a mission parameter defined in description.ext.

Assuming you have everything set up correctly, adding vehicle class names to the appropriate arrays (_advtype_lift1 through _advtype_lift7) should work. Each array corresponds to a type of helicopter (HELITYPE, defined in defines.sqf), and only one of those heli types actually uses the lift suite (INS_AdvanceType, defined in description.ext).

If you want to use a different type of helicopter than already defined, you need to add it to the appropriate sections in both defines.sqf and description.ext. If you want to be able to lift with more than one type of heli, you will need to either edit the script suite or use a different one.

Edited by Harzach

Share this post


Link to post
Share on other sites
That looks like Xeno's lift suite. Are you using the mission you downloaded from the server, or are you adding this script suite to your own mission? I ask because it uses a global defined in defines.sqf and a mission parameter defined in description.ext.

Assuming you have everything set up correctly, adding vehicle class names to the appropriate arrays (_advtype_lift1 through _advtype_lift7 should work. Each array corresponds to a type of helicopter (HELITYPE, defined in defines.sqf), and only one of those heli types actually uses the lift suite (INS_AdvanceType, defined in description.ext).

If you want to use a different type of helicopter than already defined, you need to add it to the appropriate sections in both defines.sqf and description.ext. If you want to be able to lift with more than one type of heli, you will need to either edit the script suite or use a different one.

Thanks for your response, I do not want to add any other type of lift helicopter, I am using the Chinook and the Blackhawk. I want these helicopters to lift Armored vehicles also, something they will not do. I Was wondering where I would add the the Armored vehicle classes in the script above to make the vehicles lift-able. The helicopters will lift all other types of vehicles except the armor classes.

I have copied over all the relevant files and folders correctly I believe.

Yes I have added these scripts to my Insurgency mission. So it was basically a copy and paste over from the other insurgency. I have added Blufor armor to my base which I would like to lift around the map, but the script doesn't seem to allow me to do this.

Edited by ringoray

Share this post


Link to post
Share on other sites

Did you add the necessary definitions in defines.sqf and description.ext?

Did you try adding the armor class names to the _advtype_lift# arrays in heli_lift.sqf?

Is the script system working partially or not at all?

It might be best to link to your mission file. PM me if you'd prefer.

Share this post


Link to post
Share on other sites
Did you add the necessary definitions in defines.sqf and description.ext?

Did you try adding the armor class names to the _advtype_lift# arrays in heli_lift.sqf?

Is the script system working partially or not at all?

It might be best to link to your mission file. PM me if you'd prefer.

I haven't done anything in defines.sqf because well, it's way over my head lol. I did try to add the amor to the arrays you suggest but nothing happens, so now I'm guessing this is becuase of defines.sqf not having said vehicles not added to it, right?

Here is the defines.sqf part, I think you are talking about, am I right?

//class definitions
#define westVehicleClasses  	["hilux1_civil_3_open_EP1","MMT_Civ","M1030_US_DES_EP1","HMMWV_M2","HMMWV_MK19","HMMWV_Ambulance_DES_EP1","Lada2_TK_CIV_EP1","HMMWV_M1151_M2_DES_EP1","HMMWV_M998A2_SOV_DES_EP1","M1126_ICV_mk19_EP1","M1126_ICV_M2_EP1","CH_47F_EP1","UH1Y","MH6J_EP1","BAF_Merlin_HC3_D","AW159_Lynx_BAF","MV22","UH60M_EP1","HMMWV_M1151_M2_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC","SUV_PMC_BAF","HMMWV_M998A2_SOV_DES_EP1","BAF_Jackal2_GMG_D","BAF_Jackal2_L2A1_D","LandRover_CZ_EP1","LandRover_Special_CZ_EP1","BAF_Offroad_D","ArmoredSUV_PMC","SUV_PMC"]
#define limitedSquadGear    	[["M136","Javelin"],["BAF_L7A2_GPMG","BAF_L110A1_Aim","m240_scoped_EP1","M249_EP1","M249_TWS_EP1","M249_m145_EP1"],["M24_des_EP1","BAF_LRR_scoped"]]
#define limitedGearList     	["M136","Javelin","BAF_L7A2_GPMG","BAF_L110A1_Aim","BAF_LRR_scoped","m240_scoped_EP1","M249_EP1","M249_TWS_EP1","M249_m145_EP1","M24_des_EP1"]
#define westSoldierClasses 		["US_Soldier_TL_EP1","US_Soldier_Medic_EP1","US_Soldier_LAT_EP1","US_Soldier_EP1","US_Soldier_GL_EP1","BAF_Soldier_TL_DDPM","BAF_Soldier_Medic_DDPM","BAF_Soldier_AT_DDPM","BAF_Soldier_GL_DDPM","BAF_Soldier_MG_DDPM","US_Delta_Force_TL_EP1","US_Delta_Force_Medic_EP1","US_Delta_Force_MG_EP1","US_Delta_Force_EP1","US_Delta_Force_Night_EP1","USMC_Soldier_TL","USMC_Soldier_Medic","USMC_Soldier_LAT","USMC_Soldier_AR","USMC_Soldier_GL","GER_Soldier_TL_EP1","GER_Soldier_Medic_EP1","GER_Soldier_Scout_EP1","GER_Soldier_EP1","GER_Soldier_MG_EP1","FR_TL","FR_Corpsman","FR_AR","FR_Assault_R","FR_Assault_GL"]

//unit definitions
#define ATVTYPE         (\
if(INS_ATVType1 == 1)then{"ATV_US_EP1"}else{\
if(INS_ATVType1 == 2)then{"HMMWV_Ambulance_DES_EP1"}else{\
if(INS_ATVType1 == 3)then{"LandRover_CZ_EP1"}else{\
if(INS_ATVType1 == 4)then{"Lada2_TK_CIV_EP1"}else{\
if(INS_ATVType1 == 5)then{"M1030_US_DES_EP1"}else{\
if(INS_ATVType1 == 6)then{"BAF_Offroad_D"}else{\
if(INS_ATVType1 == 7)then{"MMT_Civ"}else{\
if(INS_ATVType1 == 8)then{"SUV_PMC"}else{\
if(INS_ATVType1 == 10)then{"hilux1_civil_3_open_EP1"}else{\
"SUV_PMC_BAF"}}}}}}}}})

The script is working fully, as in I can lift humvees, suvs, and all other car types with no worries. It is just the amor I am having issues with.

Thank you for help on this thus far.

Edited by ringoray

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
Sign in to follow this  

×