Просмотр исходного кода

converted to function as file

made arc-170,y-wing and ejectRemove as function as file with 1 parameter,that being the vic u wana put the script on
Namenai 7 лет назад
Родитель
Сommit
b06144ce21

+ 30 - 22
Scripts/scripts/zeus3denScripts/vehicleBased/Vehicle Variants/Air/ARC/arcXiphos.sqf

@@ -1,4 +1,7 @@
+params["_vic"];
+
 comment "data for weapons";
+comment"format of [weapon,weaponMagType,[[seat,ammoPerMag,MagCount],[seat,ammoPerMag,MagCount],......etc]]";
 weaponData=[
 ["weapon_rim116Launcher","magazine_Missile_rim116_x21",[[-1,21,2]]],
 ["missiles_Jian","4Rnd_LG_Jian",[[-1,4,1]]],
@@ -14,42 +17,46 @@ weaponData=[
 comment "For each weapon";
 for [{_i=0}, {_i<(count weaponData)}, {_i=_i+1}] do
 {
-itemList=weaponData select _i;
-itemWeapon=itemList select 0;
-itemMagType=itemList select 1;
-itemSeats=itemList select 2;
+	itemList=weaponData select _i;
+	itemWeapon=itemList select 0;
+	itemMagType=itemList select 1;
+	itemSeats=itemList select 2;
 
 
-comment "for each seat";
-for [{_j=0}, {_j<(count itemSeats)}, {_j=_j+1}] do
-{
+	comment "for each seat";
+	for [{_j=0}, {_j<(count itemSeats)}, {_j=_j+1}] do
+	{
 
-seatData=itemSeats select _j;
-seatIndex=seatData select 0;
-seatAmmoPerMag=seatData select 1;
-seatMags=seatData select 2;
+		seatData=itemSeats select _j;
+		seatIndex=seatData select 0;
+		seatAmmoPerMag=seatData select 1;
+		seatMags=seatData select 2;
 
-_this  addWeaponTurret[itemWeapon, [seatIndex]];
-comment "adds mags";
-for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
-{
-_this  addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
+		_vic addWeaponTurret[itemWeapon, [seatIndex]];
+		
+		comment "adds mags";
+		for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
+		{
+			_vic  addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
 
-};
+		};
 
 
 
-};
+	};
 
 
 };
 
+
+
+
 comment "gets health";
-_this   addAction ["<t color='#00FF00'>Damage Report</t>",
+_vic   addAction ["<t color='#00FF00'>Damage Report</t>",
 {
 
 
-hint parseText format["<t color='#0099FF'> Damage status is :%1</t>",((1-(damage (_this  select 0)))*100)];
+hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this  select 0)))*100),"%"];
 
 },[1],0,false,true,""," driver  _target == _this "];
 
@@ -57,14 +64,15 @@ hint parseText format["<t color='#0099FF'> Damage status is :%1</t>",((1-(damage
 
 
 comment "Increment Throttle";
-_this  addAction ["<t color='#0000FF'>Increment Throttle--------U16</t>",
+_vic  addAction ["<t color='#0000FF'>Increment Throttle--------U16</t>",
 {
 (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))+.01);
 
 },[1],0,false,true,"User16","driver  _target == _this"];
 
+
 comment "Decrement Throttle";
-_this  addAction ["<t color='#FF0000'>Decrement Throttle--------U17</t>",
+_vic  addAction ["<t color='#FF0000'>Decrement Throttle--------U17</t>",
 {
 (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))-0.01);	
 

+ 8 - 8
Scripts/scripts/zeus3denScripts/vehicleBased/Vehicle Variants/Air/ARC/removeEject2.sqf

@@ -1,8 +1,8 @@
+params["_vic"];
+_vic setVehicleLock "LOCKED";
 
-_this setVehicleLock "LOCKED";
 
-
-_this  addAction ["<t color='#FFFF00'>GET IN PILOT------------- U10</t>",
+_vic  addAction ["<t color='#FFFF00'>GET IN PILOT------------- U10</t>",
 {
 
 params["_this","_user"];
@@ -11,7 +11,7 @@ _user moveInDriver (vehicle(_this));
 },[1],0,false,true];
 
 
-_this  addAction ["<t color='#00FFFF'>GET IN GUNNER------------- U10</t>",
+_vic  addAction ["<t color='#00FFFF'>GET IN GUNNER------------- U10</t>",
 {
 
 params["_this","_user"];
@@ -20,7 +20,7 @@ _user moveInTurret [ (vehicle(_this)),[0]];
 },[1],0,false,true];
 
 
-_this  addAction ["<t color='#0000FF'>GET IN NAV------------- U10</t>",
+_vic  addAction ["<t color='#0000FF'>GET IN NAV------------- U10</t>",
 {
 
 params["_this","_user"];
@@ -34,7 +34,7 @@ _user moveInTurret [ (vehicle(_this)),[1]];
 
 
 
-_this  addAction ["<t color='#FF00FF'>GET OUT OF VIC------------- U11</t>",
+_vic  addAction ["<t color='#FF00FF'>GET OUT OF VIC------------- U11</t>",
 {
 
 params["_this","_user"];
@@ -45,7 +45,7 @@ moveOut _user ;
 
 
 
-_this  addAction ["<t color='#FF0000'>LOCK--------U14</t>",
+_vic  addAction ["<t color='#FF0000'>LOCK--------U14</t>",
 {
 
 
@@ -58,7 +58,7 @@ _this  addAction ["<t color='#FF0000'>LOCK--------U14</t>",
 
 
 
-_this  addAction ["<t color='#00FF00'>UNLOCK--------U15</t>",
+_vic  addAction ["<t color='#00FF00'>UNLOCK--------U15</t>",
 {
 
 

+ 29 - 23
Scripts/scripts/zeus3denScripts/vehicleBased/Vehicle Variants/Air/YWING/ywingScylla1.sqf

@@ -1,4 +1,7 @@
+params["_vic"];
+
 comment "data for weapons";
+comment"format of [weapon,weaponMagType,[[seat,ammoPerMag,MagCount],[seat,ammoPerMag,MagCount],......etc]]";
 weaponData=[
 ["ProtonBombW","ProtonBombM",[[-1,8,3]]],
 ["ProtonBombWCLUSTER","ProtonBombMCluster",[[-1,8,6]]],
@@ -18,56 +21,59 @@ weaponData=[
 comment "For each weapon";
 for [{_i=0}, {_i<(count weaponData)}, {_i=_i+1}] do
 {
-itemList=weaponData select _i;
-itemWeapon=itemList select 0;
-itemMagType=itemList select 1;
-itemSeats=itemList select 2;
+	itemList=weaponData select _i;
+	itemWeapon=itemList select 0;
+	itemMagType=itemList select 1;
+	itemSeats=itemList select 2;
 
 
-comment "for each seat";
-for [{_j=0}, {_j<(count itemSeats)}, {_j=_j+1}] do
-{
+	comment "for each seat";
+	for [{_j=0}, {_j<(count itemSeats)}, {_j=_j+1}] do
+	{
 
-seatData=itemSeats select _j;
-seatIndex=seatData select 0;
-seatAmmoPerMag=seatData select 1;
-seatMags=seatData select 2;
+		seatData=itemSeats select _j;
+		seatIndex=seatData select 0;
+		seatAmmoPerMag=seatData select 1;
+		seatMags=seatData select 2;
 
-_this  addWeaponTurret[itemWeapon, [seatIndex]];
-comment "adds mags";
-for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
-{
-_this  addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
+		_vic addWeaponTurret[itemWeapon, [seatIndex]];
+		
+		comment "adds mags";
+		for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
+		{
+			_vic  addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
 
-};
+		};
 
 
 
-};
+	};
 
 
 };
 
+
+
+
 comment "gets health";
-_this   addAction ["<t color='#00FF00'>Damage Report</t>",
+_vic   addAction ["<t color='#00FF00'>Damage Report</t>",
 {
 
 
-hint parseText format["<t color='#0099FF'> Damage status is :%1</t>",((1-(damage (_this  select 0)))*100)];
+hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this  select 0)))*100),"%"];
 
 },[1],0,false,true,""," driver  _target == _this "];
 
 
-
 comment "Increment Throttle";
-_this  addAction ["<t color='#0000FF'>Increment Throttle--------U16</t>",
+_vic  addAction ["<t color='#0000FF'>Increment Throttle--------U16</t>",
 {
 (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))+.01);
 
 },[1],0,false,true,"User16","driver  _target == _this"];
 
 comment "Decrement Throttle";
-_this  addAction ["<t color='#FF0000'>Decrement Throttle--------U17</t>",
+_vic  addAction ["<t color='#FF0000'>Decrement Throttle--------U17</t>",
 {
 (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))-0.01);