Browse Source

at-te scripts uploaded

Namenai 7 năm trước cách đây
mục cha
commit
731615151c

+ 9 - 0
Scripts/scripts/zeus3denScripts/namenaisInit.sqf

@@ -18,4 +18,13 @@
 
 //Opfor Speedboat,adds imperial eweb for rear and u-wing gunner gun for main cannon
 	[] execVM "scripts\zeus3denScripts\vehicleBased\vehicleVariants\seaBased\speedBoats\Opfor\opforSpeedBoat.sqf";
+	
+//AT-TE Base scripts,the armor and repair
+	//[] execVM "scripts\zeus3denScripts\vehicleBased\vehicleVariants\landBased\ATTE\atteBase.sqf";
+	
+//AT-TE Type Selector that spawns in the at-te class type
+	//[] execVM "scripts\zeus3denScripts\vehicleBased\vehicleVariants\landBased\ATTE\atteTypeSelector.sqf";
+
+	
+	
 

+ 8 - 0
Scripts/scripts/zeus3denScripts/readme.txt

@@ -56,6 +56,14 @@ Here is the file path of various scripts,if its not listed here then its probabl
 				//Opfor
 					//Opfor Speedboat,adds imperial eweb for rear and u-wing gunner gun for main cannon ---H
 					[] execVM "scripts\zeus3denScripts\vehicleBased\vehicleVariants\seaBased\speedBoats\Opfor\opforSpeedBoat.sqf";
+		//landBased
+			//AT-TE
+				//AT-TE Base,applies armor and repair additions ---H
+					[] execVM "scripts\zeus3denScripts\vehicleBased\vehicleVariants\landBased\ATTE\atteBase.sqf";
+				//AT-TE Trident Class, tied to file below ---X
+					[] execVM "scripts\zeus3denScripts\vehicleBased\vehicleVariants\landBased\ATTE\atteTypeSelector.sqf";
+				//AT-TE Type Selector, runs the Trident Class file above ---H  	
+					[] execVM "C:\Users\Nafis\Documents\GitHub\501st-Missions\Scripts\scripts\zeus3denScripts\vehicleBased\vehicleVariants\landBased\ATTE"
 	//Vehicle Action Menu Based
 		//kappa-cruisie boost ---F
 			[] execVM "scripts\zeus3denScripts\vehicleBased\actionMenu\Boost\forwardKappa.sqf";

+ 1 - 0
Scripts/scripts/zeus3denScripts/vehicleBased/actionMenu/Repair/repairTo65.sqf

@@ -0,0 +1 @@
+_truck=cursortarget;
if (vehicle player == player) then 
{
	if (player distance _truck < 3) then 
	{
		if ("ToolKit" in items player) then 
			{
				if(animationState player != "AinvPknlMstpsnonWnonDnon_medic_1" ) then 
					{
						player playMove "AinvPknlMstpsnonWnonDnon_medic_1";
							sleep 3;
						player playActionNow "stop";
						
						player playMove "AinvPknlMstpsnonWnonDnon_medic_1";
							sleep 3;
							player playActionNow "stop";
							
						
						player playMove "AinvPknlMstpsnonWnonDnon_medic_1";
							sleep 3;
						player playActionNow "stop";
						
						player playMove "AinvPknlMstpsnonWnonDnon_medic_1";
							sleep 3;
					};
					
					sleep 3;
					player removeItem "ToolKit";
					
					_truck setdammage 0.35;

					hintSilent "Repaired vehicle";
			}			
		else
			{
				hintSilent "You need a toolkit to repair this vehicle!";
			};
	};
	
};


+ 84 - 0
Scripts/scripts/zeus3denScripts/vehicleBased/vehicleVariants/landBased/ATTE/atteBase.sqf

@@ -0,0 +1,84 @@
+//----------
+//Now this file is called in the init.sqf. Thus whenever the the atteTypeSelector is executed and the at-te from there is spawned,this is ran
+
+
+//Function that makes at-te gun do more dmg
+rexiAtteBulMux={
+	
+	
+	_rexiUnit = (_this select 0); 
+	_rexiProjType = _this select 4; 
+	_rexiProjectile = _this select 6; 
+	_rexiUp = vectorUp _rexiProjectile; 
+	_rexiProjPos = getPosASL _rexiProjectile; 
+	_RexiDist=1; 
+	for "_i" from 1 to 4 do { 
+			 
+	_rexiO = _rexiProjType createVehicle _rexiProjPos; 
+	_rexiO setPosASL [ 
+	(_rexiProjPos select 0) + ((vectorDir _rexiUnit) select 0)*(_RexiDist), 
+	(_rexiProjPos select 1) + ((vectorDir _rexiUnit) select 1)*(_RexiDist), 
+	(_rexiProjPos select 2) + ((vectorDir _rexiUnit) select 2)*(_RexiDist) 
+	 ]; 
+	_rexiO setVectorDirAndUp[(vectorDir _rexiUnit),_rexiUp]; 
+	_rexiO setVelocity velocity _rexiProjectile; 
+	}; 
+	
+
+};//end at-te bul mux
+
+
+
+
+
+
+//general script
+rexiAtteBase={
+	params["_vic"];
+	
+	_rexiHasBeenModded= _vic getVariable ["modded", false];
+	
+	//adds the ability to check how much dmg the at-te has taken
+	_vic addAction ["<t color='#00FF00'>Hull Damage Report</t>",
+	{
+
+
+		hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this  select 0)))*100),"%"];
+
+	},[1],0,false,true,""," commander  _target == _this "];
+	
+	
+	_vic removeAllEventHandlers "Fired";
+	
+	//ads repair function
+	_vic  addAction ["<t color='#FC6F07'>Repair</t>",
+	{
+		[_this select 0] execVM "scripts\zeus3denScripts\vehicleBased\actionMenu\Repair\repairTo65.sqf";
+	}];	
+
+	//handles reducing dmg taken by at-te
+	_vic addeventhandler ["HandleDamage",
+	{
+		_rexiUnit = _this select 0;
+		_rexiSelection = _this select 1;
+		_rexiPassedDamage = _this select 2;
+		_rexiOldDamage = 0;
+		_rexiDmgScaleFactor=3;
+		switch(_rexiSelection)do{
+			case(""):{_rexiOldDamage = damage _rexiUnit;};
+			default{};
+		};
+		_rexiReturn = _rexiOldDamage + ((_rexiPassedDamage - _rexiOldDamage) / _rexiDmgScaleFactor);
+		_rexiReturn
+	}];
+
+
+};//end at-te Base
+
+
+
+
+
+["Republic_ATTE", "init",rexiAtteBase, true, [], true] call CBA_fnc_addClassEventHandler; 
+
+["Republic_ATTE", "fired",rexiAtteBulMux] call CBA_fnc_addClassEventHandler;

+ 135 - 0
Scripts/scripts/zeus3denScripts/vehicleBased/vehicleVariants/landBased/ATTE/atteTridentClass.sqf

@@ -0,0 +1,135 @@
+//ye ole drop turret on which all stands
+	_dropTurret=_this select 0;
+	atte_drive = "B_UGV_01_rcws_F" createVehicle (position _dropTurret);
+
+//sleep 1;
+// create the ai crew to allow you to control the uav;
+	createVehicleCrew atte_drive;
+// make invis,the uav that is; 0,1,2,3
+	for [{_i=0}, {_i<(4)}, {_i=_i+1}] do
+	{
+		atte_drive setobjecttextureglobal [_i,""];  
+	};
+// remove cargo space of uav;
+	[atte_drive, -1] call ace_cargo_fnc_setSpace;
+
+
+// damage the wheels of uav to set top speed: gives 3 speeds slow forward = 10km forward = 20km fast forward = 29km;
+	{atte_drive setHitPointDamage[_x,0.90]} forEach ["HitLF2Wheel","HitRF2Wheel"];
+	{atte_drive setHitPointDamage[_x,0.90]} forEach ["HitLFWheel","HitRFWheel"];
+	{atte_drive setHitPointDamage[_x,0.90]} forEach ["HitLmWheel","HitRmWheel"];
+	
+	//dmgs wheels
+	for [{_i=20}, {_i<(25)}, {_i=_i+1}] do
+	{
+		atte_drive setHitIndex [_i, 1]; 
+	};
+	
+	atte_drive lockTurret [[1], true];
+
+// Remove the stompers weapons and add in smoke launcher and laser desig;
+	atte_drive removeWeapon "HMG_127_UGV";
+	atte_drive removeWeapon "GMG_40mm";
+
+	atte_drive addWeaponTurret  ["SmokeLauncher",[0]];  
+	for [{_i=0}, {_i<(5)}, {_i=_i+1}] do
+	{
+		atte_drive addMagazineTurret ["smokelaunchermag",[0]]; 
+	};
+	
+	atte_drive addWeaponTurret  ["Laserdesignator_mounted",[0]];  
+	atte_drive addMagazineTurret ["Laserbatteries",[0]]; 
+	
+//cant take dmg the stomper	
+	atte_drive allowDamage false;                                                                                                         
+
+// create the infantry cargo;
+	clearMagazineCargoGlobal atte_drive;
+	atte_drive addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Low_Mag", 20];// is 40 possible?
+	atte_drive addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Full_Mag", 10];
+	atte_drive addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Mag", 20];
+	atte_drive addMagazineCargoGlobal ["SWOP_DC15_Mag", 3];//carbines ammo right?
+	
+	clearItemCargoGlobal atte_drive;
+	atte_drive addItemCargoGlobal ["ACE_elasticBandage", 40];
+	atte_drive addItemCargoGlobal ["ACE_quikclot", 40];
+	atte_drive addItemCargoGlobal ["ACE_epinephrine", 10];//add morphine?
+	atte_drive addItemCargoGlobal ["ACE_plasmaIV_500", 40];
+	atte_drive addItemCargoGlobal ["ACE_packingBandage", 20];
+	atte_drive addItemCargoGlobal ["SW_SquadShield_Mag", 4];
+	atte_drive addItemCargoGlobal ["B_UavTerminal", 1];
+
+//spawns a at-te on the dropturrets pos
+	atte_body  = "Republic_ATTE" createVehicle (position _dropTurret);
+	atte_body attachTo [atte_drive,[0,-0.5,-2]]; 
+
+	
+// ITT for troop transport;	
+	atte_mens = "O_SWOP_HoverTa_2" createVehicle (position _dropTurret);
+// Set the name and attach it to the Stomper;
+	atte_mens attachTo [ATTE_DRIVE,[0,-4.2,2.2]];
+// make it invisible;	
+	(atte_mens) setobjecttextureglobal [0,""]; 
+// make it invulnerable remove the ammo 
+	atte_mens allowDamage false;
+	atte_mens setvehicleammo 0;
+	atte_mens lockDriver true;
+	[atte_mens, 9] call ace_cargo_fnc_setSpace;
+
+
+// crewITT,purpose allows uav driver to sit there;	
+	atte_mens2 = "O_SWOP_HoverTa_2" createVehicle (position _dropTurret);
+// Set the name and attach it to the Stomper;
+	ATTE_MENS2 attachTo [ATTE_DRIVE,[0,1.9,2.2]];
+// make it invisible;	
+	(atte_mens2) setobjecttextureglobal [0,""]; 
+// "make it invulnerable remove the ammo and turn the lights and engine on";
+	atte_mens2 allowDamage false;
+	atte_mens2 setvehicleammo 0;
+	atte_mens2 engineOn true;
+	atte_mens2 setPilotLight true;
+	atte_mens2 lockDriver true;
+	[atte_mens2, 9] call ace_cargo_fnc_setSpace;
+
+
+// "remote desig,commanders laz dezer";	
+	atte_com = "B_Static_Designator_01_F" createVehicle (position _dropTurret);
+// Set the name and attach it to the Stomper;
+	ATTE_com attachTo [ATTE_DRIVE,[0,0.9,6.8]]; 
+	atte_com allowDamage false;
+	createVehicleCrew atte_com; 
+	[atte_com, true] remoteExec ["hideObjectglobal", 0];
+
+
+//turrets that fire the laat cannons 1
+	atte_gun1 = "B_HMG_01_A_F" createVehicle (position _dropTurret);
+	ATTE_gun1 attachTo [ATTE_drive,[1.25,3.92,3.55]]; 
+	ATTE_gun1 removeWeapon "HMG_static"; 
+	ATTE_gun1 addWeaponTurret ["Cannon_LAAT",[0]]; 
+	ATTE_gun1 addMagazineTurret ["1000Rnd_Laser_Cannon_LAAT",[0]];    
+	createVehicleCrew ATTE_gun1;
+	atte_gun1 allowCrewInImmobile true;
+	
+	
+//turrets that fire the laat cannons 2
+	atte_gun2 = "B_HMG_01_A_F" createVehicle (position _dropTurret);
+	ATTE_gun2 attachTo [ATTE_drive,[-1.05,3.92,3.54]]; 
+	atte_gun2 removeWeapon "HMG_static";  
+	atte_gun2 addWeaponTurret ["Cannon_LAAT",[0]]; ;  
+	atte_gun2 addMagazineTurret ["1000Rnd_Laser_Cannon_LAAT",[0]];  
+	createVehicleCrew ATTE_gun2;
+	atte_gun2 allowCrewInImmobile true;
+
+	   
+//turrets that fire the laat cannons 3
+	atte_gun3 = "B_HMG_01_A_F" createVehicle (position _dropTurret);
+	ATTE_gun3 attachTo [ATTE_drive,[-0.75,-7.8,3.733]];  
+	atte_gun3 removeWeapon "HMG_static";  
+	atte_gun3 addWeaponTurret ["Cannon_LAAT",[0]]; 
+	atte_gun3 addMagazineTurret ["1000Rnd_Laser_Cannon_LAAT",[0]]; 
+	createVehicleCrew ATTE_gun3;
+	atte_gun3 setdir 180;
+	atte_gun3 allowCrewInImmobile true;
+
+//deleted the drop turret	
+	deleteVehicle _dropTurret;

+ 21 - 0
Scripts/scripts/zeus3denScripts/vehicleBased/vehicleVariants/landBased/ATTE/atteTypeSelector.sqf

@@ -0,0 +1,21 @@
+//Change watever obj u want to have be spawned so that ppl can spawn in a at-te
+rexiAtteTypeSelector={
+	params["_vic"];
+
+
+	_vic  addAction ["<t color='#47FF1A'>All Terrain Tactical Enforcer</t>",                
+	{
+	compspawner = _this select 0;
+    [] execVM "scripts\zeus3denScripts\vehicleBased\vehicleVariants\landBased\ATTE\atteTridentClass.sqf";
+	}];
+	
+	
+
+	
+	[_vic, -1] call ace_cargo_fnc_setSize
+	
+	};//end typeSelector
+	
+	["sw_dropturretobject", "init",rexiAtteTypeSelector, true, [], true] call CBA_fnc_addClassEventHandler; 
+
+