Jump to content
Sign in to follow this  
super-truite

double barrel turret

Recommended Posts

I have an issue with a turret config.

I have two machine-guns mounted on a turret on that beast: http://forums.bistudio.com/showthread.php?157756-Ekranoplane-Orlyonok.

I didn't manage yet to make it work properly (I manages to have only one muzzle flash). I tried to define the end points of the gun ("gunend") as an array, but this does not work (error ingame: asking for a number and not an array).

Any ideas?

Edited by super-truite

Share this post


Link to post
Share on other sites

usually double barrel guns arent possible(in A2), there is an script that someone made for fix the shilka, basically moves the fired bullet to the position of the other canon, for the muzzleflash you could use some particle, yet maybe you should wait to see if its some new way to do it in ARMA3 I saw picture of bohemia AA tank with twin cannons maybe they use a new solution or is the same as ARMA2

Share this post


Link to post
Share on other sites

Thanks, there might be a simpler way. I looked at the config for the zsu in arma 2 and apparently there is just one "gunend" defined and it is a group of four memory points for each barrel end.

I'll try to copy this config.

edit: hmmm zsu = shilka...Ok, that might be trickier than I thought. But wasn't it fixed in the last versions of arma2/OA. I don't remember seeing only one tracer line?

Edited by super-truite

Share this post


Link to post
Share on other sites

Yes, I believe you're right, they made it possible to define multiple muzzle points+tracers per weapon in OA, at least on certain vehicle classes. It was implemented on the Shilka, AH-6J Littlebird and Tunguska IIRC. As Foxtrop said, you had to script it a bit in Arma 1 and at least the early versions of Arma 2.

It's currently featured on the AH-9 in Arma 3 as well.

So far I've not had a look through the configs to see how it's done though so can't help right now. I'll have a look this evening if I find time.

Edited by da12thMonkey

Share this post


Link to post
Share on other sites

Is somebody have found something about this feature? Yes I confirm that in the AH-9 config we can see the array Gunbeg[] and GunEnd[] but nothing special.... I hope it is not a tricky configuration to do in the .P3D...

Please developers can you help us... :rolleyes:

Share this post


Link to post
Share on other sites
memoryPointGun[] = {"z_gunL_muzzle","z_gunR_muzzle"};

gunBeg[] = {"z_gunL_muzzle","z_gunR_muzzle"};

gunEnd[] = {"z_gunL_chamber","z_gunR_chamber"};

Just put those memory points in the MEMORY LOD and its likely any "MGunCore" class weapon (BulletBase) will come from those points

Share this post


Link to post
Share on other sites

No dice on the memoryPointGun as array - I tried that very thing and got this:

Warning Message: 'memoryPointGun/' is not a value

Here's a wild thought....

What if someone were to make a new cfgCloudlets that spawns tracers/smoke to the left/right of the weapon? That would allow us to simulate the 2nd tracer path, and since it is scripted it could be configured to spawn at the left-right location of the original regardless of where the weapon mounts are... measurements may need to be tweaked but it could be something... ????

I haven't played with cfgCloudlets to spawn anything other than smoke clouds however so making a tracer "fly" may be as simple as giving the object speed/distance to give it forward motion.

Share this post


Link to post
Share on other sites

Edit -

On a lark I tried adding a new bullet model with TWO bullets. I mapped the B_762x51_3RndBurst ammo class to the new P3D. It doesn't seem to map correctly in-game... notice that the tracers are originating from the far-left side of the model. The gun pod muzzle is on the left wing and I think what is happening is that the model "center" is being automatically found by the engine and lined up onto the muzzle memory point. If there is a way to make the engine not see the 2nd tracer's polys then I think this trick would work:

tracers.jpg

SO I just figured I would try to re-center the new bullet object by adding a 3rd tracer "bullet" that is mapped to a clear texture. PARTIALLY WORKS - as you can see the left side tracer path from the original muzzle memory point is tracking forward. These bullet models are simply pyramid models mapped to the BIS red tracer texture/rvmat. The model appears to be repeated pointing backwards for the 2nd "tracers" and as you can see they fly off to the side of the airplane, not straight forward. It looks like there's some math calculation happening to make them fly off LITERALLY on a tangent!

This is NOT SCRIPTED, just substituted the burst bullet model from "\ca\Weapons\Data\bullettracer\tracer_red" to a new one:

tracers2.jpg

Here is what I did in Oxygen for this test:

tracer3.jpg

Edited by hcpookie

Share this post


Link to post
Share on other sites

Nice idea. Alternatively you could do it with only two tracers and put the memory point between the two barrels instead of on one of them. It could solve this weird trajectory problem you have.

I'll probably have time to come back to this problem this week end.

Share this post


Link to post
Share on other sites

After tweaking that model I think the cfgCloudlets idea will be the better solution. I think it is going to need a new muzzleEffect to make that happen correctly.

Share this post


Link to post
Share on other sites

Gnat was correct but there is adduinal effect

Get allinone cfg and search what gnat out you will see there is effecone and effect two , I saw it othercday whilst look for something else

Additional old way is to animate muzzle and mem points on fired in model cfg but A3 now has better way it seems

Allinone link for beta is in this section

Share this post


Link to post
Share on other sites

try

memorypointgun = "gun_muzzle";

but not as an array. just place both the points you want in O2, highlight them both and name them "gun_muzzle" as one unit. worked for me with the AC130 and thats how the Shikla does it too.

Share this post


Link to post
Share on other sites

We'll Try that and give you a feedback ASAP, Thank you Jones.

It ifs works it should be really great because it could be so easy to integrate... :D

Share this post


Link to post
Share on other sites

Thanks for all the answers. Unfortunatly Jones solution does not work.

The one Gnat propose is not working directly. The issue is that you cannot define arrays for the muzzle position in the turret class. It seems to be possible only in the bulk of the vehicle class (like for the AH_9) and the weapon is then usable only by the pilot.

A solution would be to define the weapons as the pilot weapons and then dispatch the gun control to the gunner (more or less like it is done for pilot and gunner gun controls in choppers). But I'll try that later, as I spent to much time on this issue.

PS: @Thromp I didn't get what you mean by effect one and effect two?

Edited by super-truite

Share this post


Link to post
Share on other sites

That's what I was afraid of - this needs to be voted up if it isn't already bugged. Seems like it would be a relatively easy fix... "relatively" :)

For now I'm guessing the use of a cfgCloudlets is going to be the only way to do it. By that I mean use the existing locations for the cfgCloudlets, which is almost always located at [0,0,0]. Configure it to script a 2nd cloudlet to spawn the other barrel's effects... e.g. at [-0.75, 0,0] so you have the illusion of 2 distinct barrels. Most of the A2 cloudlet actions are to do with smoke "puffs"... I have yet to find a cloudlet that has a large acceleration to it to mimic a tracer.

I was looking at some of the vehicle packs that have ejected shells like the RHS BMD packs. Those spawn a shell model via "Fired" EventHandler and give the model speed to the side. Well, if you follow this logic you could spawn a "tracer" model and give it speed in the direction (Z+ axis I would guess) then it would imitate a tracer line. I am certain that could be scripted via the cfg Cloudlets since those contain a script function, and would should not need an EH to fire.

Share this post


Link to post
Share on other sites

Isn't it expensive, CPU wise, to script a second bullet each time one is ejected? Especially for a high rate of fire weapon?

Beside as I said, we have a lot of other stuff to debug before releasing the plane, so I think I will wait as I am sure a simpler solution exists or will exist...

Share this post


Link to post
Share on other sites

dang! sorry, ill keep looking and see what I can find. I know its possible to make it LOOK like the fires coming from 2 places as far as particle effects, but not tracers and not actual rounds.....but it has to be possible because of the guns on the littlebird...check that config

---------- Post added at 23:09 ---------- Previous post was at 22:44 ----------

this is how the Littlebird does it, but put it in your turret config instead:

	gunbeg[] = {"z_gunL_muzzle", "z_gunR_muzzle"};
gunend[] = {"z_gunL_chamber", "z_gunR_chamber"};

Share this post


Link to post
Share on other sites

@Jones and @Gnat, yes, I already tried that. As I said before, it seems it is not allowed in the turret class. This way of doing things seems possible only in the CfgVehicles class even though the NewTurret class is inside the CfgVehicles one...

Share this post


Link to post
Share on other sites

"not allowed" ?

Seems odd because the important parameters are usually the weapon and the ammo, not a turret.

Suggest showing us your full turret definition.

Share this post


Link to post
Share on other sites

whoops sorry Gnat! just copied and pasted without thinking. didnt you have a multi-turret-plane test at one time that tackled this?

Share this post


Link to post
Share on other sites

Here is my attempt with arrays:

class Turrets: Turrets
	{

		class FrontTurret: NewTurret
		{
			isCopilot = 0; 
			class ViewOptics: RCWSOptics{};
			class OpticsIn
			{
				class Wide: ViewOptics
				{
					opticsDisplayName = "W";
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 0.466;
					minFov = 0.466;
					maxFov = 0.466;
					visionMode[] = {"Normal","NVG","Ti"};
					thermalMode[] = {0,1};
					gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_02_Optics_Gunner_wide_F";
				};
				class Medium: Wide
				{
					opticsDisplayName = "M";
					initFov = 0.093;
					minFov = 0.093;
					maxFov = 0.093;
					gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_02_Optics_Gunner_medium_F";
				};
				class Narrow: Wide
				{
					opticsDisplayName = "N";
					gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_02_Optics_Gunner_narrow_F";
					initFov = 0.029;
					minFov = 0.029;
					maxFov = 0.029;
				};
			};
			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 HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = 60;
					name = "otochlaven";
					visual = "otochlaven";
					passThrough = 1;
				};
				class HitGun
				{
					armor = 0.6;
					material = 60;
					name = "otochlaven";
					visual = "otochlaven";
					passThrough = 1;
				};
			};
			memoryPointsGetInGunner= "pos gunner";
			memoryPointsGetInGunnerDir= "pos gunner dir"; 
			gunnerName = "gunner";
			stabilizedInAxes = 4;
			body = "MainTurret";
			gun = "mainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			gunnerAction = "gunner_hunter";
			gunnerGetInAction = "GetInMedium";
			gunnerGetOutAction = "GetOutMedium";
			ejectDeadGunner = 0;
			outGunnerMayFire = 1;
			inGunnerMayFire = 1;
			soundServo[] = {"A3\sounds_f\dummysound",0.0056234132,1.0};
                              gunAxis = "turret_axis";
	memoryPointGun[] = {"gun1_start","gun2_start"};
               gunBeg[] = {"gun1_start","gun2_start"};
               gunEnd[] = {"gun1_end","gun2_end"};
			weapons[] = {"LMG_M200"};
			magazines[] ={"1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Green"};
			discreteDistance[] = {100,200,300,400,600,800,1000,1200,1600,2000,2500,3000};
			discreteDistanceInitIndex = 5;
			memoryPointGunnerOptics = "main_opticView";
			gunnerOpticsModel = "\A3\Armor_F\2D_scope_crows";
			turretInfoType = "RscOptics_crows";
			gunnerForceOptics = 1;
			startEngine = 0;
			commanding = 1;
			primaryGunner = 1;
			primaryObserver = 1;
			LODTurnedIn = 1100;
			LODTurnedOut = 1100;
			usePip = 1;
			minElev = -10;
			maxElev = 78;
			initElev = 5;
			minTurn = -135;
			maxTurn = 135;
			initTurn = 0;



		};
	};

When I start a mission including the plane, I get the error message: "gunbeg is not a number" or something like that, which suggest that I can't define it as an array.

For the Littlebird, the config looks schematically like this:

class Littlebird: Helicopter
{
....
memoryPointGun[] = {"gun1_start","gun2_start"};
       gunBeg[] = {"gun1_start","gun2_start"};
       gunEnd[] = {"gun1_end","gun2_end"};

      class NewTurret; 
      class Turrets
 {
  class MainTurret : NewTurret 
  {
      ...
  };
 };



};

Hence my conclusion that arrays are possible only inside the bulk of the CfgVehicle class and not inside the subclass Newturret.

Edited by super-truite

Share this post


Link to post
Share on other sites

SOmething doesnt look quite right ....

Try something like ....

class CfgVehicles
{
class B_Heli_Light_01_F;
class Heli_Light_01_base_F : B_Heli_Light_01_F 
{
	class Turrets;
	class NewTurret;
	class AnimationSources;
};
class Littlebird: Heli_Light_01_base_F
{
...
...
...
class Turrets
   {
     class FrontTurret : NewTurret
     {
  ...
  ...
  ...
	weapons[] = {"M134_minigun"};
	magazines[] = {"5000Rnd_762x51_Belt"};
	memoryPointGun[] = {"z_gunL_muzzle","z_gunR_muzzle"};
	gunBeg[] = {"z_gunL_muzzle","z_gunR_muzzle"};
	gunEnd[] = {"z_gunL_chamber","z_gunR_chamber"};

Share this post


Link to post
Share on other sites

It is exactly what I do I think. Here is the full schematic structure of the config of our plane:

class CfgVehicles
{
class Air;
class Ship;
class Strategic;
class PlaneWreck;
class Plane: Air
{
	class NewTurret;
	class Turrets;
	class ViewOptics;
	class AnimationSources;
};

...

class REV1_Orlyonok: Plane
{
...

class Turrets
	{

		class FrontTurret: NewTurret
		{
		    weapons[] = {"LMG_M200"};
			magazines[] = {"1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Green"};
			memoryPointGun[] = {"gun1_start","gun2_start"};
               gunBeg[] = {"gun1_start","gun2_start"};
               gunEnd[] = {"gun1_end","gun2_end"};
		};
	};
};

};

Share this post


Link to post
Share on other sites

Hmm plane class not heli , possible you need to over ride further back even default : myair add two muzzle pos where myair is a copy of air but with arrayed muzzlepoints

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  

×