Jump to content
Sign in to follow this  
alexboy

UAV Turret/weapon

Recommended Posts

I have made a UAV, but the problem is, that the UAV doesnt move in the up and downward motion (like a helicopter or the rotor uav), and also like the rotor uav i would like to have 2 views, the "pilot view" where you control the UAV and the "turret view" where you only control the turret/scanner/laser designator

Any help is appreciated

This is my config file

// config.bin - 16:11:26 01/19/14, generated in 0.03 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled

#define private		0
#define protected		1
#define public		2

#define TEast		0
#define TWest		1
#define TGuerrila		2
#define TCivilian		3
#define TSideUnknown		4
#define TEnemy		5
#define TFriendly		6
#define TLogic		7

#define true	1
#define false	0

enum {
 //  = 2,	// Error parsing: Empty enum name
DESTRUCTENGINE = 2,
DESTRUCTDEFAULT = 6,
DESTRUCTWRECK = 7,
DESTRUCTTREE = 3,
DESTRUCTTENT = 4,
STABILIZEDINAXISX = 1,
STABILIZEDINAXESXYZ = 4,
STABILIZEDINAXISY = 2,
STABILIZEDINAXESBOTH = 3,
DESTRUCTNO = 0,
STABILIZEDINAXESNONE = 0,
DESTRUCTMAN = 5,
DESTRUCTBUILDING = 1,
};

class CfgPatches {
class droid {
	units[] = {droid};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {};
};
};

class CfgMagazines {
class VehicleMagazine;	// External class reference

class droid_m61 : VehicleMagazine {
	scope = public;
	displayName = "6.65mm";
	ammo = "6_65mm";
	count = 578;
	initSpeed = 1036;
	tracersEvery = 5;
	nameSound = "cannon";
};
};

class CfgActions {
class OpenBag {
	show = 0;
	hideOnUse = 1;
	shortcut = "";
	textSimple = "";
};
};

class CfgVehicles {
class Plane;

class droid : Plane {
	_generalMacro = J4P_UCSV;
	author = "mp5gosu";
	driverOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Driver_F.p3d";
	icon = "droid\ucsv_top_ca.paa";
	picture = "droid\ucsv_side_ca.paa";
	hiddenSelections[] = {"camo"};
	//hiddenSelectionsTextures[] = {"j4p_ucsv\data\ucsv_co.paa"};
	mapSize = 12;
	unitInfoType = "RscOptics_AV_pilot";
	disableInventory = 1;
	selectionFireAnim = "muzzleflash";
	simulation = "airplane";
	lock = 1;
	scope = private;
	side = TWest;
	faction = BLU_F;
	typicalCargo[] = {B_UAV_AI};
	driveOnComponent[] = {"ngear", "lgear", "rgear"};
	model = "\droid\droid.p3d";
	displayName = "U.S.A.V.";
	vehicleClass = "Autonomous";
	armor = 22;
	damageResistance = 0.00085;
	damageEffect = "AirDestructionEffects";
	armorStructured = 0;
	transportSoldier = 0;
	cost = 200000;
	vtol = 3;
	airbrake = 0;
	audible = 0.1;	// audible - bigger - better heard
	camouflage = 40;	// how dificult to spot - bigger - better spotable
	accuracy = 0.6;	// accuracy needed to recognize type of this target
	waterEffect = "HeliWater";
	dustEffect = "HeliDust";
	extCameraPosition[] = {0, 2.0, -12.0};
	isUav = 1;
	startDuration = 1;
	maxSpeed = 370;	// max speed on level road, km/h
	brakeDistance = 5;	// vehicle movement precision
	fuelCapacity = 560;
	fuelExplosionPower = 4.8;
	flaps = 0;
	cabinOpening = 0;
	selectionRotorStill = "rotor_static";
	selectionRotorMove = "rotor_blur";

	// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
	threat[] = {0.1, 0.1, 0.1};

	gearRetracting = false;
	LockDetectionSystem = 0;
	incomingMissileDetectionSystem = 0;
	irTarget = true;
	weapons[] = {};
	magazines[] = {};
	destrType = "DestructEngine";

	// internal camera viewing limitations
	class ViewPilot {
		initFov = 1;
		minFov = 0.3;
		maxFov = 1.2;
		initAngleX = 0;
		minAngleX = -35;
		maxAngleX = 35;
		initAngleY = 0;
		minAngleY = -140;
		maxAngleY = 140;
	};

	class Viewoptics {
		initAngleX = 0;
		minAngleX = 0;
		maxAngleX = 0;
		initAngleY = 0;
		minAngleY = 0;
		maxAngleY = 0;
		initFov = 1;
		minFov = 0.3;
		maxFov = 1.8;
		visionMode[] = {"Normal", NVG, "Ti"};
		thermalMode[] = {0, 1};
	};
	class ViewGunner {
				initFov = 1;
				minFov = 0.6;
				maxFov = 0.85;
				initAngleX = 0;
				minAngleX = -65;
				maxAngleX = 85;
				initAngleY = 0;
				minAngleY = -150;
				maxAngleY = 150;
				gunnerOpticsModel = "";
				gunnerOpticsEffect[] = {};
				visionMode[] = {"Normal", NVG};
			};


class MFD {};
	enableManualFire = 1;


	class Turrets  {
		class MainTurret {
			isCopilot = 0;
			minElev = -90;
			maxElev = 3;
			initElev = -3;
			minTurn = -360;
			maxTurn = 360;
			initTurn = 0;
			body = "turretx";
			gun = "turrety";
			animationSourceBody = "turretx";
			animationSourceGun = "turrety";
			inGunnerMayFire = true;
			outGunnerMayFire = true;
			commanding = -1;
			primaryGunner = 1;
			//memoryPointGun = "PIP0_dir";
			gunBeg = "laser_end";	// endpoint of the gun
			gunEnd = "laser_start";	// chamber of the gun
			memoryPointGunnerOptics = "gunnerview"; //pip0_dir
			gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Gunner_F.p3d";
			gunnerForceOptics = True;
			turretInfoType = "RscOptics_UAV_gunner";
			stabilizedInAxes = 3;
			weapons[] = {"Laserdesignator_mounted","m107"};
			magazines[] = {"Laserbatteries","10Rnd_127x99_m107"};
			GunnerCompartments = "Compartment1";
			LODTurnedIn = 1100;
			LODTurnedOut = 1100;
			gunnerInAction = "Disabled";
			gunnerAction = "Disabled";

			class OpticsIn {
				class Wide {
					opticsDisplayName = "W";
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 0.5;
					minFov = 0.5;
					maxFov = 0.5;
					directionStabilized = 1;
					visionMode[] = {"Normal", NVG, "Ti"};
					thermalMode[] = {0, 1};
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_wide_F.p3d";
				};

				class Medium : Wide {
					opticsDisplayName = "M";
					initFov = 0.1;
					minFov = 0.1;
					maxFov = 0.1;
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_medium_F.p3d";
				};

				class Narrow : Wide {
					opticsDisplayName = "N";
					initFov = 0.0286;
					minFov = 0.0286;
					maxFov = 0.0286;
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_narrow_F.p3d";
				};
			};

			class OpticsOut {
				class Monocular {
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 1.1;
					minFov = 0.133;
					maxFov = 1.1;
					visionMode[] = {"Normal", NVG};
					gunnerOpticsModel = "";
					gunnerOpticsEffect[] = {};
				};
			};

		};
	};
	envelope[] = {0.0, 0.8, 1.2, 3.0, 5.1, 8.0, 8.5, 8.0, 7.0, 4.7, 2.6, 9, 0};
	landingSpeed = 0;
	landingAoa = "rad 3";
	altFullForce = 400;
	altNoForce = 2500;
	elevatorSensitivity = 0.23;	// relative elevator sensitivity
	aileronSensitivity = 1;	// relative aileron sensitivity
	wheelSteeringSensitivity = 0.1;
	acceleration = 5;
	attenuationEffectType = "OpenHeliAttenuation";
	soundGetIn[] = {"", db-5, 1};
	soundGetOut[] = {"", db-5, 1, 40};
	soundDammage[] = {"", 0.562341, 1};
	soundEngineOnInt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_start_ext", 0.707946, 1.0};
	soundEngineOnExt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_start_int", 0.707946, 1.0, 400};
	soundEngineOffInt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_stop_int", 0.707946, 1.0};
	soundEngineOffExt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_stop_ext", 0.707946, 1.0, 400};

	class TransportItems {};

	class Sounds {
		class EngineLowOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_low_ext", db-3, 1.0, 450};
			frequency = "1.0 min (rpm + 0.5)";
			volume = "camPos*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
		};

		class EngineHighOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_high_ext", db0, 1.0, 650};
			frequency = "(rpm factor[0.5, 1.0])";
			volume = "camPos*(rpm factor[0.2, 1.0])";
		};

		class ForsageOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_forsage_ext", db1, 1.0, 900};
			frequency = "1";
			volume = "engineOn*camPos*(thrust factor[0.6, 1.0])";
			cone[] = {3.14, 3.92, 2.0, 0.5};
		};

		class WindNoiseOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\noise", db-10, 1.0, 150};
			frequency = "(0.3+(1.005*(speed factor[1, 50])))";
			volume = "camPos*(speed factor[1,  50])";
		};

		class EngineLowIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_low_int", db0, 1.0};
			frequency = "1.0 min (rpm + 0.5)";
			volume = "(1-camPos)*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
		};

		class EngineHighIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_high_int", db0, 1.0};
			frequency = "(rpm factor[0.5, 1.0])";
			volume = "(1-camPos)*(rpm factor[0.2, 1.0])";
		};

		class ForsageIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_forsage_int", db-4, 1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*(thrust factor[0.6, 1.0])";
		};

		class WindNoiseIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\noise", db-12, 1.0};
			frequency = "(0.3+(1.005*(speed factor[1, 50])))";
			volume = "(1-camPos)*(speed factor[1, 50])";
		};
	};

	class WingVortices {};

	class Damage {
		tex[] = {};
		mat[] = {"droid\data\ucsv.rvmat", "droid\data\ucsv_damage.rvmat", "droid\data\ucsv_destruct.rvmat"};
	};

	class Exhausts {
		class l_exhaust {
			position = "l_exhaust_pos";
			direction = "l_exhaust_dir";
			effect = "ExhaustEffectHeli";
		};

		class r_exhaust {
			position = "r_exhaust_pos";
			direction = "r_exhaust_dir";
			effect = "ExhaustEffectHeli";
		};
	};

	class DestructionEffects {
		class Fire1 {
			simulation = "particles";
			type = "ObjectDestructionFire1";
			position = "destructionEffect1";
			intensity = 0.03;
			interval = 1;
			lifeTime = 2;
		};
	};

	class Library {
		libTextDesc = "My UCSV";
	};
};

class B_droid : droid {
	_generalMacro = B_droid;
	scope = public;
	side = TWest;
	faction = BLU_F;
	crew = B_UAV_AI;
	typicalCargo[] = {B_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_blue_co.paa"};
};

class B_droid_BLACK : droid {
	_generalMacro = B_droid;
	scope = public;
	side = TWest;
	faction = BLU_F;
	crew = B_UAV_AI;
	typicalCargo[] = {B_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_black_co.paa"};
	displayName = "U.C.S.V. (BLACK)";
};

class O_droid : droid {
	_generalMacro = O_droid;
	scope = public;
	side = TEast;
	faction = OPF_F;
	crew = O_UAV_AI;
	typicalCargo[] = {O_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_co.paa"};
};

class I_droid : droid {
	scope = public;
	side = TGuerrila;
	faction = IND_F;
	crew = I_UAV_AI;
	typicalCargo[] = {I_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_indp_co.paa"};
};
};

This is my model.cfg file

class CfgSkeletons 
{
class Plane; //Define base class.
class Vehicle; 
class droid_skel : Plane 
{
	isDiscrete = 1;
	skeletonInherit = "";		
	skeletonBones[] = { 							
						"propeller1","",		
						"propeller2","",		
						"propeller3","",
						"turretx","",		
						"turrety","turretx","",	


					  };
};
};
class Rotation;	// External class reference

class CfgModels 
{
class Plane;
   class Vehicle; 
class Default {
	sectionsInherit = "";
	sections[] = {};
};	
class droid : Default 
{
	skeletonName = "droid_skel";
	sectionsInherit="";	
	sections[] = 
	{		
		"cowlinga_t",	
		"cowlingb_t",	
		"fuse01_t",	
		"fuse02_t",	
		"tail_t",	
		"wingl_t",	
		"wingr_t"
	};
	class Animations
     	{
		class propeller1
		{
     			type = "rotation";
     			source = "rotorH";
				selection = "propeller1";
			axis = "axis_propeller1";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};
		class propeller2
		{
			type = "rotation";
			source = "rotorH";
				selection = "propeller2";
			axis = "axis_propeller2";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};

		class propeller3
		{
			type = "rotation";
			source = "rotorH";
				selection = "propeller3";
			axis = "axis_propeller3";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};	
		class turretx
		{
     			type = "rotation";
     			source = "turretx";
				selection = "turretx";
			axis = "axis_turretx";
			memory = 1; 
			sourceAddress = "clamp";
			minValue = 0;
             	maxValue = 1;
              angle0 = "Rad -360"; 
     			angle1 = "Rad +360";
  			};

  			class turrety
		{
     			type = "rotation";
     			source = "turrety";
				selection = "turrety";
			axis = "axis_turrety";
			memory = 1; 
			sourceAddress = "clamp";
			minValue = 0;
             	maxValue = 1;
               angle0 = "0"; 
     			angle1 = "1";
  			};
	};
};	
};	

Share this post


Link to post
Share on other sites

The turret doesnt work, like i cant switch to the turret, which makes me unable to see if the turret can move or not, only option is to take controls of the UAV (be able to control the flight of the UAV), and the flying works just does a horizontal lift off for some reason rather than a vertical lift off...

Share this post


Link to post
Share on other sites

My UAV works completely differently from this, so it's hard for me to give you any advice. :(

Share this post


Link to post
Share on other sites

I have been able to make the UAV fly up and down (vertical), i just cant get the option to take control of the turret, so i can )view through the camera ( which is a sniper rifle) on the uav, and be able to move the camera's view up and down and side to side), but the only option i get is the take controls of the uav.

Share this post


Link to post
Share on other sites

Regard the vertical take off, your model in Oxygen 2 probably inst facing the right way. Make sure the front of the plane is the front on the "front view". May help to go to View > Solid Fill Faces.

Also in your animation in your model.cfg you are using the source "rotorH" which means "Rotor Horizontal". Try using "rotorV" also have a look at http://community.bistudio.com/wiki/Model_Config#Animation_sources :) If you need any more help add me on skype "mailrage".

Share this post


Link to post
Share on other sites

changing my config.cpp enableManualFire = 1; try setting it to 0. didnt work, and yes thank you for that animation, i got the rotors to start working, but I did somehow fix the problem, so now there is an option for the turret... but when i do go into the turret I am unable to turn the turret camera... it is stuck in the facing of the UAV direction... I think im missing a name of some sort on the points of the uav camera or the user input or something that keeps me from moving the camera in turret view

here is new- NEW config.cpp changed it


// config.bin - 16:11:26 01/19/14, generated in 0.03 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled

#define private		0
#define protected		1
#define public		2

#define TEast		0
#define TWest		1
#define TGuerrila		2
#define TCivilian		3
#define TSideUnknown		4
#define TEnemy		5
#define TFriendly		6
#define TLogic		7

#define true	1
#define false	0

enum {
 //  = 2,	// Error parsing: Empty enum name
DESTRUCTENGINE = 2,
DESTRUCTDEFAULT = 6,
DESTRUCTWRECK = 7,
DESTRUCTTREE = 3,
DESTRUCTTENT = 4,
STABILIZEDINAXISX = 1,
STABILIZEDINAXESXYZ = 4,
STABILIZEDINAXISY = 2,
STABILIZEDINAXESBOTH = 3,
DESTRUCTNO = 0,
STABILIZEDINAXESNONE = 0,
DESTRUCTMAN = 5,
DESTRUCTBUILDING = 1,
};

class CfgPatches {
class droid {
	units[] = {droid};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {};
};
};

class CfgMagazines {
class VehicleMagazine;	// External class reference

class droid_m61 : VehicleMagazine {
	scope = public;
	displayName = "6.65mm";
	ammo = "6_65mm";
	count = 578;
	initSpeed = 1036;
	tracersEvery = 5;
	nameSound = "cannon";
};
};

class CfgActions {
class OpenBag {
	show = 0;
	hideOnUse = 1;
	shortcut = "";
	textSimple = "";
};
};

class CfgVehicles {
class Plane;
class UAV : Plane {
	class NewTurret;	// External class reference
	class ViewPilot;	// External class reference
	class ViewOptics;	// External class reference
	class AnimationSources;	// External class reference
};
class droid : UAV {
	_generalMacro = J4P_UCSV;
	author = "mp5gosu";
	driverOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Driver_F.p3d";
	icon = "droid\ucsv_top_ca.paa";
	picture = "droid\ucsv_side_ca.paa";
	hiddenSelections[] = {"camo"};
	//hiddenSelectionsTextures[] = {"j4p_ucsv\data\ucsv_co.paa"};
	mapSize = 12;
	unitInfoType = "RscOptics_AV_pilot";
	disableInventory = 1;
	selectionFireAnim = "muzzleflash";
	simulation = "airplane";
	lock = 1;
	scope = private;
	side = TWest;
	faction = BLU_F;
	typicalCargo[] = {B_UAV_AI};
	driveOnComponent[] = {"ngear", "lgear", "rgear"};
	model = "\droid\droid.p3d";
	displayName = "U.S.A.V.";
	vehicleClass = "Autonomous";
	armor = 22;
	damageResistance = 0.00085;
	damageEffect = "AirDestructionEffects";
	armorStructured = 0;
	transportSoldier = 0;
	cost = 200000;
	vtol = 1;
	airbrake = 0;
	audible = 0.1;	// audible - bigger - better heard
	camouflage = 40;	// how dificult to spot - bigger - better spotable
	accuracy = 0.6;	// accuracy needed to recognize type of this target
	waterEffect = "HeliWater";
	dustEffect = "HeliDust";
	extCameraPosition[] = {0, 2.0, -12.0};
	isUav = 1;
	startDuration = 1;
	maxSpeed = 370;	// max speed on level road, km/h
	brakeDistance = 5;	// vehicle movement precision
	fuelCapacity = 560;
	fuelExplosionPower = 4.8;
	flaps = 0;
	cabinOpening = 0;
	selectionRotorStill = "rotor_static";
	selectionRotorMove = "rotor_blur";

	// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
	threat[] = {0.1, 0.1, 0.1};

	gearRetracting = false;

	irTarget = true;

	destrType = "DestructEngine";

	// internal camera viewing limitations
	class ViewPilot {
		initFov = 1;
		minFov = 0.3;
		maxFov = 1.2;
		initAngleX = 0;
		minAngleX = -35;
		maxAngleX = 35;
		initAngleY = 0;
		minAngleY = -140;
		maxAngleY = 140;
	};

	class Viewoptics {
		initAngleX = 0;
		minAngleX = 0;
		maxAngleX = 0;
		initAngleY = 0;
		minAngleY = 0;
		maxAngleY = 0;
		initFov = 1;
		minFov = 0.3;
		maxFov = 1.8;
		visionMode[] = {"Normal", NVG, "Ti"};
		thermalMode[] = {0, 1};
	};
	class AnimationSources : AnimationSources {
		class Bombs {
			source = "user";
			animPeriod = 1e-006;
			initPhase = 0;
		};

		class AT_missiles {
			source = "user";
			animPeriod = 0.99;
			initPhase = 1;
		};
	};

	class ViewGunner {
				initFov = 1;
				minFov = 0.6;
				maxFov = 0.85;
				initAngleX = 0;
				minAngleX = -65;
				maxAngleX = 85;
				initAngleY = 0;
				minAngleY = -150;
				maxAngleY = 150;
				gunnerOpticsModel = "";
				gunnerOpticsEffect[] = {};
				visionMode[] = {"Normal", NVG};
			};


class MFD {};
	enableManualFire = 0;
	weapons[] = {"CMFlareLauncher"};
	magazines[] = {"240Rnd_CMFlare_Chaff_Magazine"};
	LockDetectionSystem = 1 + 8 + 4;
	incomingMissileDetectionSystem = 16;
	laserscanner = true;

	class NewTurret;	// External class reference

	class Turrets {
		class MainTurret : NewTurret {
			isCopilot = 0;
			minElev = -90;
			maxElev = 3;
			initElev = -3;
			minTurn = -360;
			maxTurn = 360;
			initTurn = 0;
			selectionFireAnim = "";
			//body = "turretx";
			//gun = "turrety";
			//animationSourceBody = "turretx";
			//animationSourceGun = "turrety";
			body = "mainTurret";
			gun = "mainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			inGunnerMayFire = true;
			outGunnerMayFire = true;
			commanding = -1;
			primaryGunner = 1;
			memoryPointGun = "PIP0_dir";
			gunBeg = "laser_end";	// endpoint of the gun
			gunEnd = "laser_start";	// chamber of the gun
			memoryPointGunnerOptics = "gunnerview"; //pip0_dir
			gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Gunner_F.p3d";
			gunnerForceOptics = True;
			turretInfoType = "RscOptics_UAV_gunner";
			stabilizedInAxes = 3;
			weapons[] = {"Laserdesignator_mounted","m107"};
			magazines[] = {"Laserbatteries","10Rnd_127x99_m107"};
			GunnerCompartments = "Compartment1";
			enableManualFire = 0;
			LODTurnedIn = 1100;
			LODTurnedOut = 1100;
			gunnerInAction = "Disabled";
			gunnerAction = "Disabled";

			class OpticsIn {
				class Wide {
					opticsDisplayName = "W";
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 0.5;
					minFov = 0.5;
					maxFov = 0.5;
					directionStabilized = 1;
					visionMode[] = {"Normal", NVG, "Ti"};
					thermalMode[] = {0, 1};
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_wide_F.p3d";
				};

				class Medium : Wide {
					opticsDisplayName = "M";
					initFov = 0.1;
					minFov = 0.1;
					maxFov = 0.1;
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_medium_F.p3d";
				};

				class Narrow : Wide {
					opticsDisplayName = "N";
					initFov = 0.0286;
					minFov = 0.0286;
					maxFov = 0.0286;
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_narrow_F.p3d";
				};
			};

			class OpticsOut {
				class Monocular {
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 1.1;
					minFov = 0.133;
					maxFov = 1.1;
					visionMode[] = {"Normal", NVG};
					gunnerOpticsModel = "";
					gunnerOpticsEffect[] = {};
				};
			};

		};
	};
	envelope[] = {0.0, 0.8, 1.2, 3.0, 5.1, 8.0, 8.5, 8.0, 7.0, 4.7, 2.6, 9, 0};
	landingSpeed = 0;
	landingAoa = "rad 3";
	altFullForce = 400;
	altNoForce = 2500;
	elevatorSensitivity = 0.23;	// relative elevator sensitivity
	aileronSensitivity = 1;	// relative aileron sensitivity
	wheelSteeringSensitivity = 0.1;
	acceleration = 5;
	attenuationEffectType = "OpenHeliAttenuation";
	soundGetIn[] = {"", db-5, 1};
	soundGetOut[] = {"", db-5, 1, 40};
	soundDammage[] = {"", 0.562341, 1};
	soundEngineOnInt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_start_ext", 0.707946, 1.0};
	soundEngineOnExt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_start_int", 0.707946, 1.0, 400};
	soundEngineOffInt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_stop_int", 0.707946, 1.0};
	soundEngineOffExt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_stop_ext", 0.707946, 1.0, 400};

	class TransportItems {};
	uavCameraDriverPos = "PiP0_pos";
	uavCameraDriverDir = "PiP0_dir";
	uavCameraGunnerPos = "laser_start";
	uavCameraGunnerDir = "commanderview";
	memoryPointLDust = "l_dust";
	memoryPointRDust = "r_dust";
	memoryPointDriverOptics = "PiP0_pos";

	class Sounds {
		class EngineLowOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_low_ext", db-3, 1.0, 450};
			frequency = "1.0 min (rpm + 0.5)";
			volume = "camPos*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
		};

		class EngineHighOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_high_ext", db0, 1.0, 650};
			frequency = "(rpm factor[0.5, 1.0])";
			volume = "camPos*(rpm factor[0.2, 1.0])";
		};

		class ForsageOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_forsage_ext", db1, 1.0, 900};
			frequency = "1";
			volume = "engineOn*camPos*(thrust factor[0.6, 1.0])";
			cone[] = {3.14, 3.92, 2.0, 0.5};
		};

		class WindNoiseOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\noise", db-10, 1.0, 150};
			frequency = "(0.3+(1.005*(speed factor[1, 50])))";
			volume = "camPos*(speed factor[1,  50])";
		};

		class EngineLowIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_low_int", db0, 1.0};
			frequency = "1.0 min (rpm + 0.5)";
			volume = "(1-camPos)*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
		};

		class EngineHighIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_high_int", db0, 1.0};
			frequency = "(rpm factor[0.5, 1.0])";
			volume = "(1-camPos)*(rpm factor[0.2, 1.0])";
		};

		class ForsageIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_forsage_int", db-4, 1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*(thrust factor[0.6, 1.0])";
		};

		class WindNoiseIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\noise", db-12, 1.0};
			frequency = "(0.3+(1.005*(speed factor[1, 50])))";
			volume = "(1-camPos)*(speed factor[1, 50])";
		};
	};

	class WingVortices {};

	class Damage {
		tex[] = {};
		mat[] = {"droid\data\ucsv.rvmat", "droid\data\ucsv_damage.rvmat", "droid\data\ucsv_destruct.rvmat"};
	};

	class Exhausts {
		class l_exhaust {
			position = "l_exhaust_pos";
			direction = "l_exhaust_dir";
			effect = "ExhaustEffectHeli";
		};

		class r_exhaust {
			position = "r_exhaust_pos";
			direction = "r_exhaust_dir";
			effect = "ExhaustEffectHeli";
		};
		class b_exhaust {
			position = "b_exhaust_pos";
			direction = "b_exhaust_dir";
			effect = "ExhaustEffectHeli";
		};
	};

	class DestructionEffects {
		class Fire1 {
			simulation = "particles";
			type = "ObjectDestructionFire1";
			position = "destructionEffect1";
			intensity = 0.03;
			interval = 1;
			lifeTime = 2;
		};
		class Fire2 {
			simulation = "particles";
			type = "ObjectDestructionFire2";
			position = "destructionEffect2";
			intensity = 0.03;
			interval = 1;
			lifeTime = 2;
		};
	};

	class Library {
		libTextDesc = "My U.S.A.V.";
	};
};
class B_droid : droid {
	_generalMacro = B_droid;
	scope = public;
	side = TWest;
	faction = BLU_F;
	crew = B_UAV_AI;
	typicalCargo[] = {B_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_blue_co.paa"};
};

class B_droid_BLACK : droid {
	_generalMacro = B_droid;
	scope = public;
	side = TWest;
	faction = BLU_F;
	crew = B_UAV_AI;
	typicalCargo[] = {B_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_black_co.paa"};
	displayName = "U.S.A.V. (BLACK)";
};

class O_droid : droid {
	_generalMacro = O_droid;
	scope = public;
	side = TEast;
	faction = OPF_F;
	crew = O_UAV_AI;
	typicalCargo[] = {O_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_co.paa"};
};

class I_droid : droid {
	scope = public;
	side = TGuerrila;
	faction = IND_F;
	crew = I_UAV_AI;
	typicalCargo[] = {I_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_indp_co.paa"};
};

};

MODEL.cfg

class CfgSkeletons 
{
class Plane; //Define base class.
class Vehicle; 
class droid_skel : Plane 
{
	isDiscrete = 1;
	skeletonInherit = "";		
	skeletonBones[] = { 							
						"propeller1","",		
						"propeller2","",		
						"propeller3","",
						"mainturret","",		
						"maingun","mainturret","",	


					  };
};
};
class Rotation;	// External class reference

class CfgModels 
{
class Plane;
   class Vehicle; 
class Default {
	sectionsInherit = "";
	sections[] = {};
};	
class droid : Default 
{
	skeletonName = "droid_skel";
	sectionsInherit="";	
	sections[] = 
	{		
		"cowlinga_t",	
		"cowlingb_t",	
		"fuse01_t",	
		"fuse02_t",	
		"tail_t",	
		"wingl_t",	
		"wingr_t"
	};
	class Animations
     	{
		class propeller1
		{
     			type = "rotation";
     			source = "rotor";
				selection = "propeller1";
			axis = "axis_propeller1";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};
		class propeller2
		{
			type = "rotation";
			source = "rotor";
				selection = "propeller2";
			axis = "axis_propeller2";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};

		class propeller3
		{
			type = "rotation";
			source = "rotor";
				selection = "propeller3";
			axis = "axis_propeller3";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};	
		class mainturret
		{
     			type = "rotation";
     			source = "mainturret";
				selection = "mainturret";
			axis = "axis_turretx";
			memory = 1; 
			sourceAddress = "clamp";
			minValue = 0;
             	maxValue = 1;
              angle0 = "Rad -360"; 
     			angle1 = "Rad +360";
  			};

  			class maingun
		{
     			type = "rotation";
     			source = "maingun";
				selection = "maingun";
			axis = "axis_turrety";
			memory = 1; 
			sourceAddress = "clamp";
			minValue = 0;
             	maxValue = 1;
               angle0 = "0"; 
     			angle1 = "1";
  			};
	};
};	
};	

Edited by alexboy
FIXED A PROBLEM, now new problem with the camera of turret

Share this post


Link to post
Share on other sites

OK I fixed everything but the fact that the "secondary" weapon doesnt work, when I am in the turret of the uav, i only get the option of the laser , I cannot change the weapon to another such as a weapon on the UAV, it should have like a sniper on the UAV too, but I cannot find out how to get the right ammo and weapon config in so the UAV thinks it has a sniper/rifle on the uav, and also so that i can shoot the weapon also..

on another note, I cannot move the turret up/down or side-to-side, it just points in the direction of the UAV, I dont know if i dont have the right model bone names in the animation or something like that,

any help is appreciated...

model.cfg and config.cpp is in above post

Share this post


Link to post
Share on other sites

Remove the last comma, quote, quote, comma from your skeleton.

That bits clearly wrong.

BUT, no guarantees because turrets seem to be an extra barstard in A3 and I think UAV class has weapon restriction and turret issues also very much relate to correct Naming of sections within the model.

Share this post


Link to post
Share on other sites

Yea... still not working, I cant find out how to find the names of the selections of UAVS... Been working on the coding for 3 weeks... its really annoying now.. Thought it would be really cool to have a UAV marksman, to keep soldiers out of danger, and like a eagle in the sky can scout out and take out targets silently, without huge explosions, would be great for night high value target missions...

Gnat, any way I could send you the unbin addon to you, and maybe you can look at it to see if you can see if anythings missing?

Share this post


Link to post
Share on other sites

Found an issue with turret... ok

so when i am in the turret view and (sometimes the turret twists and sometimes it doesnt)... but when the uav is off and on the ground and i move my mouse it makes the uav turret move.. but when it moves it makes the engine turning on sound go on and when i stop.. the sound fades away...

Then when I am in the driver view... and i press "x" or "c" to twist the uav side to side the turret it self twists till it reaches i guess its "limit angle" and stops but the uav can still twist and its the same for either way i "twist" the uav...

Also when i go upside down or fly and turn slowly by angling the plane side to side... the turret moves again...

What is making all this happen?

any help is appreciated

Share this post


Link to post
Share on other sites
when the uav is off and on the ground and i move my mouse it makes the uav turret move.. but when it moves it makes the engine turning on sound go on and when i stop.. the sound fades away...

try adding this to your turret: (assuming you want the engine sound to go away)

startEngine = 0;

Then when I am in the driver view... and i press "x" or "c" to twist the uav side to side the turret it self twists till it reaches i guess its "limit angle" and stops but the uav can still twist and its the same for either way i "twist" the uav...

Also when i go upside down or fly and turn slowly by angling the plane side to side... the turret moves again...

you mean the turret is moving on its own when you yaw the uav - opposite the moves you are making with the uav controls? is that not because you have stabilization turned on for the turret?

Share this post


Link to post
Share on other sites

You have a gunner AND a pilot?

This could be why the turret moves on its own.

Doesn't a normal BI UAV just have 1 crew?

Share this post


Link to post
Share on other sites

dr_strangepete - ill try the startengine = 0, and for the stabilation... what do you mean turn the stabilation on ? how would i turn it on, because i probably dont.. and by "x" and "c" I mean like twist side to side as in ( like the top rotor blades of a helicopter or twisting your body as you stand up)...

Gnat -there is really no crew in the UAV basically its remote controlled... so if you are flying in pilot no one is in the gunner basically but (i dont know if it can lase if scripted to or if there is a target and such), on the other hand when you are in the gunner seat the UAV still flies and can go to waypoints, but the player controls the turret.

so i think what you are saying is true there is only one... just like the "remote control" moves the uav or something like that

Share this post


Link to post
Share on other sites

FIXED THE TURRET!!!!!!!!!!!!!! I honestly dont know how I fixed it i related my model.cfg to arma 2 model.cfg of the ah1z... added min and maxvalue.... and in the config I did so much I dont remember how i fixed that...

ALSO how do i make the UAV fly like the Rotor UAV does (vertically without having the option of auto-hover) basically like a helicopter

But my only problem now is I think there is a such thing a stabilization where the UAV turret will be pointing in a certain spot where the uav turret/laser is pointing at no matter how the uav turns....

How do i make this work or how do i add it to my config cause in

enum {
 //  = 2,	// Error parsing: Empty enum name
DESTRUCTENGINE = 2,
DESTRUCTDEFAULT = 6,
DESTRUCTWRECK = 7,
DESTRUCTTREE = 3,
DESTRUCTTENT = 4,
STABILIZEDINAXISX = 1,
STABILIZEDINAXESXYZ = 4,
STABILIZEDINAXISY = 2,
STABILIZEDINAXESBOTH = 3,
DESTRUCTNO = 0,
STABILIZEDINAXESNONE = 0,
DESTRUCTMAN = 5,
DESTRUCTBUILDING = 1,
};

I dont know how to use these and it says error so im confused whats wrong ... is it just the comment it is saying cant be understood by the game or what?

also if that code above is ok how do I add it to the config so that what i want happens?

Edited by alexboy

Share this post


Link to post
Share on other sites

You only really need:

class Turrets
{
class MainTurret : NewTurret
{
	stabilizedInAxes = 4;

Share this post


Link to post
Share on other sites
You only really need:

class Turrets
{
class MainTurret : NewTurret
{
	stabilizedInAxes = 4;

In my Turret I have

class Turrets
{
class MainTurret : NewTurret
{
	stabilizedInAxes = 3; // have tried 0,1,2, and true

im so confused on why none of the ones I have used havent worked yet?

Share this post


Link to post
Share on other sites
im so confused on why none of the ones I have used havent worked yet?

Are you sure it isn't working? What Arma3 thinks of as a stabilized turret isn't what I thought it was.

The only reason I mentioned that was because you said you were getting errors trying to enumerate all the values:

I dont know how to use these and it says error so im confused whats wrong

When all you just have to do is include the reference\value you want. If you're still stuck tomorrow, I will post up a config using the Tools sample tank. That's what I was experimenting with, but all it really equated to was the horizon would stay level in the tank optic when on a steep slope. It still means the optics bounce around when moving over slopes though.

Edited by UNN

Share this post


Link to post
Share on other sites

For some Reason the UAV I made turret works... but when the UAV flies around the turret doesnt stay where its pointed it just movess like when the UAV turns the turret doesnt point to the same point where it was before it turned or when it flies straight it doesnt stay on target...

I get what you mean and what the error was for after looking at it for awhile... but still stuck on why it doesnt work

Might be another factor that affects how the turret stays on target ?

On another note... how do I make my UAV fly like the rotor... no vtol=0 or 1 or 2 work.... possibly makes take off slower... but i dont want horizontal flight/take off .... I want vertical flight/take off like a helicopter or the rotor UAV

Share this post


Link to post
Share on other sites

For some Reason the UAV I made turret works... but when the UAV flies around the turret doesnt stay where its pointed it just movess like when the UAV turns the turret doesnt point to the same point where it was before it turned or when it flies straight it doesnt stay on target...

In situations like that I usually inherit the class I'm interested in without any modifications. Then start adding the new features I want, until I hit the problem. It can take a while and it's pain, but sometimes you learn new stuff using a process of elimination. For example you added a new weapon class, have you tried removing that to see if the turret starts to operate as normal?

But also you mentioned in that Turret Inheritance post about class NewTurret. Are you inheriting from a new turret class or an existing UAV turret?

how do I make my UAV fly like the rotor

Fixed wing UAV's use simulation = "airplanex" while the Darter uses simulation "helicopterx".

I would suggest getting your new turret working by inheriting everything from say class B_UAV_02_CAS_F (Greyhawk). Once you are happy with your new turret, switch the inheritance to class B_UAV_01_F (Darter). That way you can confirm your turret still works the same way. Once everything is confirmed, you can change the config one step at a time, and you will always have a backup to revert to if something breaks.

Note:

When you switch the inheritance to the Darter, you may have to add all the turret properties from scratch, by copying and pasting all the Greyhawk turret entries. Unless it turns out that you can use the external class NewTurret, without any problems. I assume you know about the in game config browser?

Edited by UNN

Share this post


Link to post
Share on other sites

I know everything you are saying... but its been a while... I forgot how to inherit a specific class such as B_UAV_02_CAS_F so that my UAV is basically the same as that?

and as for the game config browser... I do not remember that at all :/?

I use to go through pbos and pbos to find stuff i need... if theres an easier way that would help alot lol...

Share this post


Link to post
Share on other sites

I forgot how to inherit a specific class such as B_UAV_02_CAS_F so that my UAV is basically the same as that?

I had it wrong myself, but I've since confirmed this works ok:

class CfgVehicles
{
class UAV_02_base_F;
class UAV_02_CAS_base_F : UAV_02_base_F
{
	class Turrets;	
};
class B_UAV_02_CAS_F : UAV_02_CAS_base_F
{
	class Turrets : Turrets
	{
		class MainTurret;
	};

};
class test_uav : B_UAV_02_CAS_F
{
	displayName = "Test UAV";

	class Turrets : Turrets
	{
		class MainTurret : MainTurret
		{
		};
	};
};
};

With the above the turret will stay focused on a ground position, but if you inherited straight from newTurret it won't. I haven't worked out what the actual config property is, so if do let us know.

and as for the game config browser... I do not remember that at all :/?

I think it was around in Arma1 as a mission, but it's been added to the the UI now. In the editor it's the cog shaped icon (CTRL + G). Or ther is abutton for it in the debug console thats shown when you hit escape during a mission preview.

But in this case, as you might want to create a new turret class from scratch for your heli type UAV, see

Config-Extractor

If you call that script for example, using the following:

[configFile/'CfgVehicles'/'B_UAV_02_CAS_F', true] execVM "Scripts\cfgGet.sqf";

You can paste all the config entries for the class B_UAV_02_CAS_F to a text editor. Which in theory means you could just paste the turret class into your own addon if you wanted.

I also use my own script for extracting and formatting the entire config, despite its size it makes construing things like the above turret inheritance a bit easier. The link below is the entire config from current Arma3 release in one file:

allConfig.txt

Edit:

I just noticed the Darter does have a turret.

Edited by UNN

Share this post


Link to post
Share on other sites

Yea haha, for some reason when i Pul the mainturret it doesnt work, but i guess I have to delete everything in my turret section and place one by one to see which one throws it off :/

finally my UAV has vertical lift off... had to change some model.cfg to make the propellers turn again, but they work now...

just gotta do trial and error with the turret,

On another note... Since I already got the turret to be able to turn in all directions and was bored... I got it to be able to fire actual bullets, like the 30mm, But I cannot find a way to make the UAV be able to fire sniper rounds... since the ammo of a sniper isnt part of vehicle config... is there some way of doing something like that ? making turret fire a sniper round ?

Share this post


Link to post
Share on other sites

I get an error saying that there is no entry in b_droid of damagehalf[] ??? but after seeing that error i put it into b_droid , but it still comes up....

also still no luck with the turret being able to stay on target when the UAV moves around...

Also I dont know if im missing anything else, because errors seem to keep coming up everytime i fix one error

Another error (not error but doesnt work properly) my weapon js_w_fa18_m61_y doesnt work properly... when I change my turret to this weapon and fire... the bullets just drop from the bottom on the UAV and drop to the ground... but for the first weapon js_m_fa18_m61 works perfectly ???

it still works in game... but idk what to do now ive looked at it so many times

Any help is highly appreciated

Thank you in advance

New config

// config.bin - 16:11:26 01/19/14, generated in 0.03 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled

#define private		0
#define protected		1
#define public		2

#define TEast		0
#define TWest		1
#define TGuerrila		2
#define TCivilian		3
#define TSideUnknown		4
#define TEnemy		5
#define TFriendly		6
#define TLogic		7

#define true	1
#define false	0

enum {

DESTRUCTENGINE = 2,
DESTRUCTDEFAULT = 6,
DESTRUCTWRECK = 7,
DESTRUCTTREE = 3,
DESTRUCTTENT = 4,
STABILIZEDINAXISX = 1,
STABILIZEDINAXESXYZ = 4,
STABILIZEDINAXISY = 2,
STABILIZEDINAXESBOTH = 3,
DESTRUCTNO = 0,
STABILIZEDINAXESNONE = 0,
DESTRUCTMAN = 5,
DESTRUCTBUILDING = 1,
};

class CfgPatches {
class droid {
	units[] = {droid};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {};
};
};



class CfgActions {
class OpenBag {
	show = 0;
	hideOnUse = 1;
	shortcut = "";
	textSimple = "";
};
};

class CfgMagazines {
class VehicleMagazine;	// External class reference

class js_m_fa18_m61 : VehicleMagazine {
	scope = public;
	displayName = "20mm";
	ammo = "B_20mm";
	count = 1000;
	initSpeed = 1036;
	tracersEvery = 5;
	nameSound = "cannon";
};
class js_m_fa18_m61_y : VehicleMagazine {
	scope = public;
	displayName = "20mm Y Tracer";
	ammo = "B_30mm_AP_Tracer_Yellow";
	count = 1000;
	initSpeed = 1;
	tracersEvery = 1;
	nameSound = "cannon";
};


};


class CfgWeapons {
class CannonCore;	// External class reference
class MissileLauncher;	// External class reference
class RocketPods;	// External class reference
class H_PilotHelmetFighter_B;	// External class reference
class U_B_PilotCoveralls;	// External class reference
class ItemInfo;	// External class reference
class UniformItem;	// External class reference



class js_w_fa18_m61 : CannonCore {
	scope = public;
	displayName = "20mm";
	displayNameMagazine = "20mm";
	shortNameMagazine = "20mm";
	nameSound = "cannon";
	cursor = "EmptyCursor";
	cursorAim = "mg";
	magazines[] = {"js_m_fa18_m50"};
	canLock = LockYes;
	ballisticsComputer = 2;
	modes[] = {"manual", "close", "short", "medium", "far"};

	class GunParticles {
		class Effect {
			effectName = "MachineGun1";
			positionName = "nosegun";
			directionName = "nosegun_dir";
		};
	};

	class manual : CannonCore {
		displayName = "M61A2 20mm";
		autoFire = true;
		sound[] = {"A3\Sounds_F\weapons\gatling\gatling1v1", db0, 1, 1000};
		weaponSoundEffect = "DefaultRifle";
		reloadTime = 0.02;
		dispersion = 0.0025;
		soundContinuous = 0;
		showToPlayer = true;
		burst = 1;
		aiRateOfFire = 0.5;	// delay between shots at given distance
		aiRateOfFireDistance = 50;
		minRange = 1;
		minRangeProbab = 0.01;
		midRange = 2;
		midRangeProbab = 0.01;
		maxRange = 3;
		maxRangeProbab = 0.01;
		textureType = "fullAuto";
	};

	class close : manual {
		showToPlayer = false;
		burst = 15;
		aiRateOfFire = 0.25;	// delay between shots at given distance
		aiRateOfFireDistance = 400;
		minRange = 0;
		minRangeProbab = 0.05;
		midRange = 200;
		midRangeProbab = 0.7;
		maxRange = 400;
		maxRangeProbab = 0.2;
	};

	class short : close {
		burst = 10;
		aiRateOfFire = 0.5;	// delay between shots at given distance
		aiRateOfFireDistance = 500;
		minRange = 300;
		minRangeProbab = 0.2;
		midRange = 400;
		midRangeProbab = 0.7;
		maxRange = 500;
		maxRangeProbab = 0.2;
	};

	class medium : close {
		burst = 7;
		aiRateOfFire = 1;	// delay between shots at given distance
		aiRateOfFireDistance = 900;
		minRange = 400;
		minRangeProbab = 0.2;
		midRange = 700;
		midRangeProbab = 0.7;
		maxRange = 900;
		maxRangeProbab = 0.2;
	};

	class far : close {
		burst = 4;
		aiRateOfFire = 1.5;	// delay between shots at given distance
		aiRateOfFireDistance = 1500;
		minRange = 800;
		minRangeProbab = 0.2;
		midRange = 1000;
		midRangeProbab = 0.4;
		maxRange = 1500;
		maxRangeProbab = 0.01;
	};
};

class js_w_fa18_m61_y : CannonCore {
	scope = public;
	displayName = "20mm Y Tracer";
	displayNameMagazine = "20mm Y Tracer";
	shortNameMagazine = "20mm Y Tracer";
	nameSound = "cannon";
	cursor = "EmptyCursor";
	cursorAim = "mg";
	magazines[] = {"js_m_fa18_m61_y"};
	canLock = LockYes;
	ballisticsComputer = 2;
	modes[] = {"manual", "close", "short", "medium", "far"};

	class GunParticles {
		class Effect {
			effectName = "MachineGun1";
			positionName = "nosegun";
			directionName = "nosegun_dir";
		};
	};

	class manual : CannonCore {
		displayName = "M61A2 20mm";
		autoFire = true;
		sound[] = {"A3\Sounds_F\weapons\gatling\gatling1v1", db0, 1, 1000};
		weaponSoundEffect = "DefaultRifle";
		reloadTime = 0.02;
		dispersion = 0.0025;
		soundContinuous = 0;
		showToPlayer = true;
		burst = 1;
		aiRateOfFire = 0.5;	// delay between shots at given distance
		aiRateOfFireDistance = 50;
		minRange = 1;
		minRangeProbab = 0.01;
		midRange = 2;
		midRangeProbab = 0.01;
		maxRange = 3;
		maxRangeProbab = 0.01;
		textureType = "fullAuto";
	};

	class close : manual {
		showToPlayer = false;
		burst = 15;
		aiRateOfFire = 0.25;	// delay between shots at given distance
		aiRateOfFireDistance = 400;
		minRange = 0;
		minRangeProbab = 0.05;
		midRange = 200;
		midRangeProbab = 0.7;
		maxRange = 400;
		maxRangeProbab = 0.2;
	};

	class short : close {
		burst = 10;
		aiRateOfFire = 0.5;	// delay between shots at given distance
		aiRateOfFireDistance = 500;
		minRange = 300;
		minRangeProbab = 0.2;
		midRange = 400;
		midRangeProbab = 0.7;
		maxRange = 500;
		maxRangeProbab = 0.2;
	};

	class medium : close {
		burst = 7;
		aiRateOfFire = 1;	// delay between shots at given distance
		aiRateOfFireDistance = 900;
		minRange = 400;
		minRangeProbab = 0.2;
		midRange = 700;
		midRangeProbab = 0.7;
		maxRange = 900;
		maxRangeProbab = 0.2;
	};

	class far : close {
		burst = 4;
		aiRateOfFire = 1.5;	// delay between shots at given distance
		aiRateOfFireDistance = 1500;
		minRange = 800;
		minRangeProbab = 0.2;
		midRange = 1000;
		midRangeProbab = 0.4;
		maxRange = 1500;
		maxRangeProbab = 0.01;
	};
};
};




class CfgVehicles {


class Helicopter;
class UAV : Helicopter {
	class NewTurret;	// External class reference
	class ViewPilot;	// External class reference
	class ViewOptics;	// External class reference
	class AnimationSources;	// External class reference
};



class UAV_02_base_F : UAV {


	author="Bohemia Interactive";
	_generalMacro="UAV_02_base_F";
	displayName="MQ4A Greyhawk";
	icon="\A3\Drones_F\Air_F_Gamma\UAV_02\Data\UI\Map_UAV_02_CA.paa";
	picture="\A3\Drones_F\Air_F_Gamma\UAV_02\Data\UI\UAV_02_base_F.paa";
	unitInfoType="RscOptics_AV_pilot";
	attenuationEffectType="OpenHeliAttenuation";
	soundGetIn[]={"",0.562341,1};
	soundGetOut[]={"",0.562341,1,40};
	soundDammage[]={"",0.562341,1};
	soundEngineOnInt[]={"A3\Sounds_F\air\UAV_02\UAV_02_start_ext",0.707946,1};
	soundEngineOnExt[]={"A3\Sounds_F\air\UAV_02\UAV_02_start_int",0.707946,1,400};
	soundEngineOffInt[]={"A3\Sounds_F\air\UAV_02\UAV_02_stop_int",0.707946,1};
	soundEngineOffExt[]={"A3\Sounds_F\air\UAV_02\UAV_02_stop_ext",0.707946,1,400};

	class Sounds
	{

		class EngineLowOut
		{
			sound[]={"A3\Sounds_F\air\UAV_02\UAV_02_low_ext",0.707946,1,450};
			frequency="1.0 min (rpm + 0.5)";
			volume="camPos*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
		};

		class EngineHighOut
		{
			sound[]={"A3\Sounds_F\air\UAV_02\UAV_02_high_ext",1,1,650};
			frequency="(rpm factor[0.5, 1.0])";
			volume="camPos*(rpm factor[0.2, 1.0])";
		};

		class ForsageOut
		{
			sound[]={"A3\Sounds_F\air\UAV_02\UAV_02_forsage_ext",1.12202,1,900};
			frequency="1";
			volume="engineOn*camPos*(thrust factor[0.6, 1.0])";
			cone[]={3.14,3.92,2,0.5};
		};

		class WindNoiseOut
		{
			sound[]={"A3\Sounds_F\air\UAV_02\noise",0.316228,1,150};
			frequency="(0.3+(1.005*(speed factor[1, 50])))";
			volume="camPos*(speed factor[1,  50])";
		};

		class EngineLowIn
		{
			sound[]={"A3\Sounds_F\air\UAV_02\UAV_02_low_int",1,1};
			frequency="1.0 min (rpm + 0.5)";
			volume="(1-camPos)*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
		};

		class EngineHighIn
		{
			sound[]={"A3\Sounds_F\air\UAV_02\UAV_02_high_int",1,1};
			frequency="(rpm factor[0.5, 1.0])";
			volume="(1-camPos)*(rpm factor[0.2, 1.0])";
		};

		class ForsageIn
		{
			sound[]={"A3\Sounds_F\air\UAV_02\UAV_02_forsage_int",0.630957,1};
			frequency="1";
			volume="engineOn*(1-camPos)*(thrust factor[0.6, 1.0])";
		};

		class WindNoiseIn
		{
			sound[]={"A3\Sounds_F\air\UAV_02\noise",0.251189,1};
			frequency="(0.3+(1.005*(speed factor[1, 50])))";
			volume="(1-camPos)*(speed factor[1, 50])";
		};

	};


	formationX=30;
	formationZ=30;

	class Armory
	{
		description="The MQ-4A Greyhawk is a combat ready unmanned aerial vehicle. It´s based on a U.S. design proven by the MQ-9 with a turbo-propeller engine. It carries a modernized tracking and tracing equipment and improved camouflage. OPFOR engineers and manufacturers were able to perfect construction, but their engines are less fuel effective. The OPFOR drone is labeled K40 Ababil-3. Both sides arm the drone with air-to ground Scalpel missiles or laser guided bombs (CAS version).";
	};


	model="\A3\Drones_F\Air_F_Gamma\UAV_02\UAV_02_F.p3d";
	driveOnComponent[]={"wheel_1_1","wheel_2_1","wheel_2_2"};

	class TransportItems {};

	uavCameraDriverPos="PiP0_pos";
	uavCameraDriverDir="PiP0_dir";
	uavCameraGunnerPos="laserstart";
	uavCameraGunnerDir="commanderview";
	memoryPointLDust="DustLeft";
	memoryPointRDust="DustRight";
	memoryPointDriverOptics="PiP0_pos";
	driverOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Driver_F.p3d";
	driverForceOptics=0;

	class WingVortices {};


	class ViewPilot : ViewPilot
	{
		initFov=1;
		minFov=0.3;
		maxFov=1.2;
		initAngleX=0;
		minAngleX=-65;
		maxAngleX=85;
		initAngleY=0;
		minAngleY=-150;
		maxAngleY=150;
	};

	class Viewoptics : ViewOptics
	{
		initAngleX=0;
		minAngleX=0;
		maxAngleX=0;
		initAngleY=0;
		minAngleY=0;
		maxAngleY=0;
		initFov=1;
		minFov=0.3;
		maxFov=1.2;
		visionMode[]={"Normal","NVG","Ti"};
		thermalMode[]={0,1};
	};

	class AnimationSources : AnimationSources
	{

		class Bombs
		{
			source="user";
			animPeriod=1e-006;
			initPhase=0;
		};

		class AT_missiles
		{
			source="user";
			animPeriod=0.99;
			initPhase=1;
		};

	};


	maxSpeed=382;
	envelope[]={0,0.3,1.15,2.2,4.35,5.2,6,6.55,6.65,6.8,3.6,1.8,0};
	landingSpeed=100;
	altFullForce=7000;
	altNoForce=14000;
	aileronSensitivity=0.8;
	elevatorSensitivity=0.25;
	driverCompartments="Compartment3";
	cargoCompartments[]={"Compartment2"};

	class Damage
	{
		tex[]={};
		mat[]={"A3\Drones_F\Air_F_Gamma\UAV_02\Data\UAV_02.rvmat","A3\Drones_F\Air_F_Gamma\UAV_02\Data\UAV_02_damage.rvmat","A3\Drones_F\Air_F_Gamma\UAV_02\Data\UAV_02_destruct.rvmat"};
	};


	hiddenSelections[]={"camo1"};
	hiddenSelectionsTextures[]={"A3\Drones_F\Air_F_Gamma\UAV_02\Data\UAV_02_CO.paa"};
	weapons[]={"CMFlareLauncher","missiles_SCALPEL"};
	magazines[]={"240Rnd_CMFlare_Chaff_Magazine","6Rnd_LG_scalpel"};
	LockDetectionSystem="1 + 8 + 4";
	incomingMissileDetectionSystem=16;
	laserscanner=1;

	class Turrets
	{

		class MainTurret : NewTurret
		{
			isCopilot=0;
			minElev=-85;
			maxElev=10;
			initElev=0;
			minTurn=-360;
			maxTurn=360;
			initTurn=0;
			outGunnerMayFire=1;
			inGunnerMayFire=1;
			commanding=-1;
			body="mainTurret";
			gun="mainGun";
			animationSourceBody="mainTurret";
			animationSourceGun="mainGun";
			memoryPointGun="laserstart";
			memoryPointGunnerOptics="commanderview";
			gunBeg="commanderview";
			gunEnd="laserstart";
			gunnerOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Gunner_F.p3d";
			gunnerForceOptics=1;
			turretInfoType="RscOptics_UAV_gunner";
			stabilizedInAxes=3;
			enableManualFire=0;
			weapons[]={"Laserdesignator_mounted"};
			magazines[]={"Laserbatteries"};
			GunnerCompartments="Compartment1";
			gunnerInAction="Disabled";
			gunnerAction="Disabled";

			class OpticsIn
			{

				class Wide
				{
					opticsDisplayName="W";
					initAngleX=0;
					minAngleX=-30;
					maxAngleX=30;
					initAngleY=0;
					minAngleY=-100;
					maxAngleY=100;
					initFov=0.5;
					minFov=0.5;
					maxFov=0.5;
					directionStabilized=1;
					visionMode[]={"Normal","NVG","Ti"};
					thermalMode[]={0,1};
					gunnerOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_wide_F.p3d";
				};

				class Medium : Wide
				{
					opticsDisplayName="M";
					initFov=0.1;
					minFov=0.1;
					maxFov=0.1;
					gunnerOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_medium_F.p3d";
				};

				class Narrow : Wide
				{
					opticsDisplayName="N";
					initFov=0.0286;
					minFov=0.0286;
					maxFov=0.0286;
					gunnerOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_narrow_F.p3d";
				};

			};

			class OpticsOut
			{

				class Monocular
				{
					initAngleX=0;
					minAngleX=-30;
					maxAngleX=30;
					initAngleY=0;
					minAngleY=-100;
					maxAngleY=100;
					initFov=1.1;
					minFov=0.133;
					maxFov=1.1;
					visionMode[]={"Normal","NVG"};
					gunnerOpticsModel="";
					gunnerOpticsEffect[]={};
				};

			};

		};

	};
};

class UAV_02_CAS_base_F : UAV_02_base_F
{
	class Turrets;	

	displayName="MQ4A Greyhawk (CAS)";
	weapons[]={"CMFlareLauncher","GBU12BombLauncher"};
	magazines[]={"240Rnd_CMFlare_Chaff_Magazine","2Rnd_GBU12_LGB"};

	class AnimationSources : AnimationSources
	{

		class Bombs
		{
			source="user";
			animPeriod=1e-006;
			initPhase=1;
		};

		class AT_missiles
		{
			source="user";
			animPeriod=0.99;
			initPhase=0;
		};

	};
};
class B_UAV_02_CAS_F : UAV_02_CAS_base_F
{
author="Bohemia Interactive";
	_generalMacro="B_UAV_02_F";
	scope=2;
	side=1;
	faction="BLU_F";
	crew="B_UAV_AI";
	typicalCargo[]={"B_UAV_AI"};
	accuracy=1;
	class Turrets : Turrets
	{
		class MainTurret;
	};

};


class droid : B_UAV_02_CAS_F{


	selectionHRotorStill = "mainRotorStatic";
	selectionHRotorMove = "mainRotorBlurred";
	selectionVRotorStill = "";
	selectionVRotorMove = "";
	mainRotorSpeed = 1.0; // rotor animation parameters
   		backRotorSpeed = 1.0;
	maxMainRotorDive=70;
	minMainRotorDive=-7;
	neutralMainRotorDive=0;
	minBackRotorDive = 0;
	maxBackRotorDive = 0;
	neutralBackRotorDive = 0;
	memoryPointLMissile = "Missile_1"; //zkusim otocit
	memoryPointRMissile = "Missile_2"; //zkusim otocit
	memoryPointLRocket = "Rocket_1";
	memoryPointRRocket = "Rocket_2";
	mainbladecenter = "";
	memorypointpilot = ""; //added
	damageHalf[]={};
	damageFull[]={};

	type = 2; //added
	_generalMacro = "U.S.A.V.";
	author = "alexboy";
	driverOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Driver_F.p3d";
	icon = "droid\ucsv_top_ca.paa";
	picture = "droid\ucsv_side_ca.paa";
	hiddenSelections[] = {"camo"};
	//hiddenSelectionsTextures[] = {"j4p_ucsv\data\ucsv_co.paa"};
	mapSize = 12;
	unitInfoType = "RscOptics_AV_pilot";
	disableInventory = 1;
	selectionFireAnim = "muzzleflash";
	simulation = "helicopterx";
	lock = 1;
	scope = public;
	side = TWest;
	faction = BLU_F;
	typicalCargo[] = {B_UAV_AI};
	driveOnComponent[] = {"ngear", "lgear", "rgear"};
	model = "\droid\droid.p3d";
	displayName = "U.S.A.V.";
	vehicleClass = "Autonomous";
	armor = 22;
	damageResistance = 0.00085;
	damageEffect = "AirDestructionEffects";
	armorStructured = 0;
	transportSoldier = 0;
	cost = 200000;
	vtol = true; // 1 or 0
	airbrake = 0;
	audible = 0.1;	// audible - bigger - better heard
	camouflage = 40;	// how dificult to spot - bigger - better spotable
	accuracy = 0.6;	// accuracy needed to recognize type of this target


	dustEffect="UAVDust";
	waterEffect="UAVWater";
	washDownDiameter="10.0f";
	washDownStrength="0.25f";
	precision=15;
	steerAheadSimul=0.5;
	steerAheadPlan=0.7;
	predictTurnPlan=2;
	predictTurnSimul=1.5;

	extCameraPosition[] = {0, 2.0, -12.0};
	isUav = 1;
	startDuration = 1;
	maxSpeed = 370;	// max speed on level road, km/h
	brakeDistance = 5;	// vehicle movement precision
	fuelCapacity = 560;
	fuelExplosionPower = 4.8;
	flaps = 0;
	cabinOpening = 0;
	selectionRotorStill = "rotor_static";
	selectionRotorMove = "rotor_blur";


	soundEngineOnInt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_start_ext", 0.707946, 1.0};
	soundEngineOnExt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_start_int", 0.707946, 1.0, 400};
	soundEngineOffInt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_stop_int", 0.707946, 1.0};
	soundEngineOffExt[] = {"A3\Sounds_F\air\UAV_02\UAV_02_stop_ext", 0.707946, 1.0, 400};


	// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
	threat[] = {0.1, 0.1, 0.1};

	gearRetracting = false;

	irTarget = true;

	destrType = "DestructEngine";

	// internal camera viewing limitations
	class ViewPilot {
		initFov = 1;
		minFov = 0.3;
		maxFov = 1.2;
		initAngleX = 0;
		minAngleX = -35;
		maxAngleX = 35;
		initAngleY = 0;
		minAngleY = -140;
		maxAngleY = 140;
	};

	class Viewoptics {
		initAngleX = 0;
		minAngleX = 0;
		maxAngleX = 0;
		initAngleY = 0;
		minAngleY = 0;
		maxAngleY = 0;
		initFov = 1;
		minFov = 0.3;
		maxFov = 1.8;
		visionMode[] = {"Normal", NVG, "Ti"};
		thermalMode[] = {0, 1};
	};
	class AnimationSources : AnimationSources {
		class Bombs {
			source = "user";
			animPeriod = 1e-006;
			initPhase = 0;
		};

		class AT_missiles {
			source = "user";
			animPeriod = 0.99;
			initPhase = 1;
		};

	};

	class ViewGunner {
				initFov = 1;
				minFov = 0.6;
				maxFov = 0.85;
				initAngleX = 0;
				minAngleX = -65;
				maxAngleX = 85;
				initAngleY = 0;
				minAngleY = -150;
				maxAngleY = 150;
				gunnerOpticsModel = "";
				gunnerOpticsEffect[] = {};
				visionMode[] = {"Normal", NVG};
			};


class MFD {};
	enableManualFire = 0;
	weapons[] = {"CMFlareLauncher"};
	magazines[] = {"240Rnd_CMFlare_Chaff_Magazine"};
	LockDetectionSystem = 1 + 8 + 4;
	incomingMissileDetectionSystem = 16;
	laserscanner = true;

	//class NewTurret;	// External class reference

	class Turrets : Turrets {
		class MainTurret :  MainTurret{
			isCopilot = -1;//0
			minElev = -90;
			maxElev = 270;//90
			initElev = -3;
			minTurn = -360;
			maxTurn = 360;
			initTurn = 0;

			gunnerOutOpticsShowCursor = 1; //added
			//gunnerOpticsShowCursor = 1;
			stabilizedInAxes=3;//if messes up put make this not work

			selectionFireAnim = "zasleh"; //added
			//body = "turretx";
			//gun = "turrety";
			startEngine = 0; // added
			//animationSourceBody = "turretx";
			//animationSourceGun = "turrety";
			body = "mainTurret";
			gun = "mainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			inGunnerMayFire = true;
			outGunnerMayFire = true;
			commanding = -1;
			primaryGunner = 1;
			memoryPointGun = "commanderview"; //"PIP0_dir"
			gunBeg = "laser_end";	// endpoint of the gun
			gunEnd = "laser_start";	// chamber of the gun
			memoryPointGunnerOptics = "gunnerview"; //pip0_dir
			gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Gunner_F.p3d";
			gunnerForceOptics = True;
			turretInfoType = "RscOptics_UAV_gunner";

			weapons[] = {"Laserdesignator_mounted", "js_w_fa18_m61", "js_w_fa18_m61_y"}; //"m107"}
			magazines[] = {"Laserbatteries", "js_m_fa18_m61", "js_m_fa18_m61_y"}; //"droid_m61"}
			GunnerCompartments = "Compartment1";
			enableManualFire = 0;
			//LODTurnedIn = 1100;
			//LODTurnedOut = 1100;
			gunnerInAction = "Disabled";
			gunnerAction = "Disabled";

			class OpticsIn {
				class Wide {
					opticsDisplayName = "W";
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 0.5;
					minFov = 0.5;
					maxFov = 0.5;
					directionStabilized = 1;
					visionMode[] = {"Normal", NVG, "Ti"};
					thermalMode[] = {0, 1};
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_wide_F.p3d";
				};

				class Medium : Wide {
					opticsDisplayName = "M";
					initFov = 0.1;
					minFov = 0.1;
					maxFov = 0.1;
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_medium_F.p3d";
				};

				class Narrow : Wide {
					opticsDisplayName = "N";
					initFov = 0.0286;
					minFov = 0.0286;
					maxFov = 0.0286;
					gunnerOpticsModel = "A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_narrow_F.p3d";
				};
			};

			class OpticsOut {
				class Monocular {
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 1.1;
					minFov = 0.133;
					maxFov = 1.1;
					visionMode[] = {"Normal", NVG};
					gunnerOpticsModel = "";
					gunnerOpticsEffect[] = {};
				};
			};

		};
	};


	envelope[] = {0.0, 0.8, 1.2, 3.0, 5.1, 8.0, 8.5, 8.0, 7.0, 4.7, 2.6, 9, 0};
	landingSpeed = 0;
	landingAoa = "rad 3";

	altFullForce = 400;
	altNoForce = 2500;
	elevatorSensitivity = 0.23;	// relative elevator sensitivity
	aileronSensitivity = 1;	// relative aileron sensitivity
	wheelSteeringSensitivity = 0.1;
	acceleration = 5;
	attenuationEffectType = "OpenHeliAttenuation";
	soundGetIn[] = {"", db-5, 1};
	soundGetOut[] = {"", db-5, 1, 40};
	soundDammage[] = {"", 0.562341, 1};


	class TransportItems {};
	uavCameraDriverPos = "PiP0_pos";
	uavCameraDriverDir = "PiP0_dir";
	uavCameraGunnerPos = "laser_start";
	uavCameraGunnerDir = "commanderview";
	memoryPointLDust = "l_dust";
	memoryPointRDust = "r_dust";
	memoryPointDriverOptics = "PiP0_pos";

	class Sounds {
		class EngineLowOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_low_ext", db-3, 1.0, 450};
			frequency = "1.0 min (rpm + 0.5)";
			volume = "camPos*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
		};

		class EngineHighOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_high_ext", db0, 1.0, 650};
			frequency = "(rpm factor[0.5, 1.0])";
			volume = "camPos*(rpm factor[0.2, 1.0])";
		};

		class ForsageOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_forsage_ext", db1, 1.0, 900};
			frequency = "1";
			volume = "engineOn*camPos*(thrust factor[0.6, 1.0])";
			cone[] = {3.14, 3.92, 2.0, 0.5};
		};

		class WindNoiseOut {
			sound[] = {"A3\Sounds_F\air\UAV_02\noise", db-10, 1.0, 150};
			frequency = "(0.3+(1.005*(speed factor[1, 50])))";
			volume = "camPos*(speed factor[1,  50])";
		};

		class EngineLowIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_low_int", db0, 1.0};
			frequency = "1.0 min (rpm + 0.5)";
			volume = "(1-camPos)*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
		};

		class EngineHighIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_high_int", db0, 1.0};
			frequency = "(rpm factor[0.5, 1.0])";
			volume = "(1-camPos)*(rpm factor[0.2, 1.0])";
		};

		class ForsageIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\UAV_02_forsage_int", db-4, 1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*(thrust factor[0.6, 1.0])";
		};

		class WindNoiseIn {
			sound[] = {"A3\Sounds_F\air\UAV_02\noise", db-12, 1.0};
			frequency = "(0.3+(1.005*(speed factor[1, 50])))";
			volume = "(1-camPos)*(speed factor[1, 50])";
		};
	};

	class WingVortices {};

	class Damage {
		tex[] = {};
		mat[] = {"droid\data\ucsv.rvmat", "droid\data\ucsv_damage.rvmat", "droid\data\ucsv_destruct.rvmat"};
	};

	class Exhausts {
		class l_exhaust {
			position = "l_exhaust_pos";
			direction = "l_exhaust_dir";
			effect = "ExhaustEffectHeli";
		};

		class r_exhaust {
			position = "r_exhaust_pos";
			direction = "r_exhaust_dir";
			effect = "ExhaustEffectHeli";
		};
		class b_exhaust {
			position = "b_exhaust_pos";
			direction = "b_exhaust_dir";
			effect = "ExhaustEffectHeli";
		};
	};

	class DestructionEffects {
		class Fire1 {
			simulation = "particles";
			type = "ObjectDestructionFire1";
			position = "destructionEffect1";
			intensity = 0.03;
			interval = 1;
			lifeTime = 2;
		};
		class Fire2 {
			simulation = "particles";
			type = "ObjectDestructionFire2";
			position = "destructionEffect2";
			intensity = 0.03;
			interval = 1;
			lifeTime = 2;
		};
	};

	class Library {
		libTextDesc = "My U.S.A.V.";
	};
};
class B_droid : droid {
	_generalMacro = B_droid;
	enableSweep=false; //ADDED
	scope = public;
	side = TWest;
	damageHalf[]={

		};
	damageFull[]={

		};
	faction = BLU_F;
	crew = B_UAV_AI;
	typicalCargo[] = {B_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_blue_co.paa"};
};

class B_droid_BLACK : droid {
	_generalMacro = B_droid;
	enableSweep=false; //ADDED
	scope = public;
	side = TWest;

	faction = BLU_F;
	crew = B_UAV_AI;
	typicalCargo[] = {B_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_black_co.paa"};
	displayName = "U.S.A.V. (BLACK)";
};

class O_droid : droid {
	_generalMacro = O_droid;
	enableSweep=false; //ADDED
	scope = public;
	side = TEast;
	faction = OPF_F;
	crew = O_UAV_AI;
	typicalCargo[] = {O_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_co.paa"};
};

class I_droid : droid {
	scope = public;
	enableSweep=false; //ADDED
	side = TGuerrila;
	faction = IND_F;
	crew = I_UAV_AI;
	typicalCargo[] = {I_UAV_AI};
	hiddenSelectionsTextures[] = {"droid\data\ucsv_indp_co.paa"};
};

};

model.cfg

class CfgSkeletons 
{
class Helicopter; //Define base class.
class Vehicle; 
class droid_skel : Helicopter 
{
	isDiscrete = 1;
	skeletonInherit = "";		
	skeletonBones[] = { 							
						"propeller1","",		
						"propeller2","",		
						"propeller3","",
						"mainturret","",		
						"maingun","mainturret"	


					  };
};
};
class Rotation;	// External class reference

class CfgModels 
{
class Helicopter;
   class Default; 
class Vehicle : Default {
	sectionsInherit = "";
	sections[] = {};
};	
class droid : Vehicle 
{
	skeletonName = "droid_skel";
	sectionsInherit="Vehicle";	
	sections[] = 
	{		
		"cowlinga_t",	
		"cowlingb_t",	
		"fuse01_t",	
		"fuse02_t",	
		"tail_t",	
		"wingl_t",	
		"wingr_t",
		"mainRotorStatic",
		"mainRotorBlurred",
		"tailRotorStatic",
		"tailRotorBlurred",
		"muzzleflash",
		"trup",
		"motor",
		"elektronika",
		"munice",
		"sklo predni P",
		"sklo predni L",
		"mala vrtule",
		"velka vrtule",
		"clan",
		"clan_sign",
		"podsvit pristroju",
		"zbran",
		"vez"
	};
	class Animations
     	{



		class mainturret
		{
     			type = "rotation";
     			source = "mainturret";
				selection = "mainturret";
			axis = "axis_turretx";
			memory = 0; 
			sourceAddress = "clamp";
			animPeriod=0;
			minValue="rad -360";
			maxValue="rad +360";
              angle0 = "Rad -360"; 
     			angle1 = "Rad +360";
  			};

  			class maingun
		{
     			type = "rotation";
     			source = "maingun";
				selection = "maingun";
			axis = "axis_turrety";
			memory = 0; 
			sourceAddress = "clamp";
			animPeriod=0;
			minValue="rad -90";
			maxValue="rad +270";
                  angle0 = "Rad -90"; 
     			angle1 = "Rad +270";
  			};

		class propeller1
		{
     			type = "rotation";
     			source = "rotorH";
				selection = "propeller1";
			axis = "axis_propeller1";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};
		class propeller2
		{
			type = "rotation";
			source = "rotorH";
				selection = "propeller2";
			axis = "axis_propeller2";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};

		class propeller3
		{
			type = "rotation";
			source = "rotorH";
				selection = "propeller3";
			axis = "axis_propeller3";
			memory = 0; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "180"; 
     			angle1 = "0";
  			};	

	};
};	
};	

Edited by alexboy

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  

×