PDA

View Full Version : Multiple Turrets



deanosbeano
Mar 10 2007, 10:33
Hey all .
i have set up 3 turrets on a chinook (thanks to rksl and marco p chinook config)

ok i am realy early in learning process and i am at the stage now where every fix is giving a little step forward but 1/2 step back.

so the things i need to know and for people to see where i might be going wrong is as follows

right side turret
working

left side turret
enterable
gunerpos ok
bullet exit ok
not moveable

rear turret
same as left turret but bullet exits at front of chopper

i have named all selections on eachgun the same except for adding either an l for leftside or r for rear.
the config


<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Animations &#58; Animations
{
class mainTurret
{
type = &#34;rotationY&#34;;
source = &#34;mainTurret&#34;;
selection = &#34;otocvez&#34;;
axis = &#34;osaveze&#34;;
animPeriod = 0;
minValue = &#34;rad -360&#34;;
maxValue = &#34;rad +360&#34;;
angle0 = &#34;rad -360&#34;;
angle1 = &#34;rad +360&#34;;
};

class mainGun
{
type = &#34;rotationX&#34;;
source = &#34;mainGun&#34;;
selection = &#34;otochlaven&#34;;
axis = &#34;osahlavne&#34;;
animPeriod = 0;
minValue = &#34;rad -360&#34;;
maxValue = &#34;rad +360&#34;;
angle0 = &#34;rad -360&#34;;
angle1 = &#34;rad +360&#34;;
};
class myTurret
{
type = &#34;rotationY&#34;;
source = &#34;myTurret&#34;;
selection = &#34;otocvezl&#34;;
axis = &#34;osavezel&#34;;
animPeriod = 0;
minValue = &#34;rad -360&#34;;
maxValue = &#34;rad +360&#34;;
angle0 = &#34;rad -360&#34;;
angle1 = &#34;rad +360&#34;;
};
class myGun
{
type = &#34;rotationX&#34;;
source = &#34;myGun&#34;;
selection = &#34;otochlavenl&#34;;
axis = &#34;osahlavnel&#34;;
animPeriod = 0;
minValue = &#34;rad -360&#34;;
maxValue = &#34;rad +360&#34;;
angle0 = &#34;rad -360&#34;;
angle1 = &#34;rad +360&#34;;
};
class myTurretr
{
type = &#34;rotationY&#34;;
source = &#34;myTurretr&#34;;
selection = &#34;otocvezr&#34;;
axis = &#34;osavezer&#34;;
animPeriod = 0;
minValue = &#34;rad -360&#34;;
maxValue = &#34;rad +360&#34;;
angle0 = &#34;rad -360&#34;;
angle1 = &#34;rad +360&#34;;
};
class myGunr
{
type = &#34;rotationX&#34;;
source = &#34;myGunr&#34;;
selection = &#34;otochlavenr&#34;;
axis = &#34;osahlavner&#34;;
animPeriod = 0;
minValue = &#34;rad -360&#34;;
maxValue = &#34;rad +360&#34;;
angle0 = &#34;rad -360&#34;;
angle1 = &#34;rad +360&#34;;
};

};
};

};[/QUOTE]

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Turrets
{
class MainTurret&#58; NewTurret
{
startEngine = 0;
outGunnerMayFire = 1;
commanding = -1;
gunnerName = &#34;left Side Gunner&#34;;
memoryPointsGetInGunner = &#34;pos_gunner&#34;;
memoryPointsGetInGunnerDir = &#34;pos_gunner_dir&#34;;
memoryPointGun = &#34;machinegun&#34;;
memoryPointGunnerOptics = &#34;gunnerview&#34;;
selectionFireAnim = &#34;zasleh&#34;;
castGunnerShadow = 1;
viewGunnerShadow = 1;
gunnerAction = &#34;UH60_Gunner&#34;;
gunnerInAction = &#34;UH60_Gunner&#34;;

weapons&#91;&#93; = {&#34;M2&#34;};
magazines&#91;&#93; = {&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;};

minElev = -45;
maxElev = 15;
initElev = 0;
minTurn = 40;
maxTurn = 130;
initTurn = 90;

gunnerOpticsModel = &#34;&#92;ca&#92;weapons&#92;optika_empty&#34;;
gunnerForceOptics = 0;
};






class myTurret&#58; MainTurret {
body = &#34;myTurret&#34;;
gun = &#34;myGun&#34;;
animationSourceBody = &#34;OtocVezl&#34;;
animationSourceGun = &#34;OtocHlavenl&#34;;
animationSourceHatch = &#34;&#34;;
selectionFireAnim = &#34;zaslehl&#34;;
startEngine = 0;
outGunnerMayFire = 1;
commanding = -2;
gunnerName = &#34;right Side Gunner&#34;;
memoryPointsGetInGunner = &#34;pos_gunnerl&#34;;
proxyIndex = 2;
memoryPointsGetInGunnerDir = &#34;pos_gunner_dirl&#34;;
memoryPointGun = &#34;machinegunl&#34;;
memoryPointGunnerOptics = &#34;gunnerviewl&#34;;
castGunnerShadow = 1;
viewGunnerShadow = 1;

gunnerAction = &#34;UH60_Gunner&#34;;
gunnerInAction = &#34;UH60_Gunner&#34;;

weapons&#91;&#93; = {&#34;M2&#34;};
magazines&#91;&#93; = {&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;};

minElev = -45;
maxElev = 15;
initElev = 0;
minTurn = -150;
maxTurn = -30;
initTurn = -90;

gunnerOpticsModel = &#34;&#92;ca&#92;weapons&#92;optika_empty&#34;;
gunnerForceOptics = 0;
};








class myTurretr&#58; NewTurret
{
body = &#34;myTurretr&#34;;
gun = &#34;myGunr&#34;;
startEngine = 0;
outGunnerMayFire = 1;
commanding = -3;
gunnerName = &#34;rear Side Gunner&#34;;
memoryPointsGetInGunner = &#34;pos_gunnerr&#34;;
proxyIndex = 3;
memoryPointsGetInGunnerDir = &#34;pos_gunner_dirr&#34;;
memoryPointGun = &#34;machinegunr&#34;;
memoryPointGunnerOptics = &#34;gunnerviewr&#34;;
selectionFireAnim = &#34;zaslehr&#34;;
castGunnerShadow = 1;
viewGunnerShadow = 1;
gunnerAction = &#34;UH60_Gunner&#34;;
gunnerInAction = &#34;UH60_Gunner&#34;;

weapons&#91;&#93; = {&#34;M2&#34;};
magazines&#91;&#93; = {&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;,&#34;100Rnd_127x99_M2&#34;};

minElev = -45;
maxElev = 15;
initElev = 0;
minTurn = 40;
maxTurn = 330;
initTurn = 190;

gunnerOpticsModel = &#34;&#92;ca&#92;weapons&#92;optika_empty&#34;;
gunnerForceOptics = 0;
};
};[/QUOTE]

the p3d
proxy:&#92;ca&#92;temp&#92;proxies&#92;m2&#92;gunner.01 << mg1
proxy:&#92;ca&#92;temp&#92;proxies&#92;m2&#92;gunner.02 <mg2
proxy:&#92;ca&#92;temp&#92;proxies&#92;m2&#92;gunner.03 << mg3

could the problem be that the last 2 proxies dont exist ?
i dont get any errors and the man is sat in the right place, i cant use the uh_60 proxies they set the gunner in space.

Linker Split
Mar 10 2007, 14:32
are you referring to ArmA right?

deanosbeano
Mar 10 2007, 15:05
yep , if i could do this in ofp i wouldnt need arma http://forums.bistudio.com/oldsmileys/wink_o.gif

sry for confusion ,but there is no arma config section

Linker Split
Mar 10 2007, 15:39
ahhhh&#33;&#33;&#33; Do you want to kill me right?
I was thinking you was referring to OFP... I&#39;m trying to make the same thing (in OFP) at our BlackHawks... when I saw all those references you posted, I was trying to commit suicide...  http://forums.bistudio.com/oldsmileys/tounge2.gif

Anyway, I don&#39;t know how to help you...
or maybe...
for OFP, when you make a machinegun, or a weapon in general, there were pre-defined selections that you must use (i.e. OtocVez for the machinegun, skolo for vehicles) and not the ones you name as you want, (i.e. OtocVez2)... So i think that the problem is that there are pre-defined selection for different machineguns that you must use... not create names on your own... http://forums.bistudio.com/oldsmileys/wink_o.gif
hope it helped

Linker Split

Planck
Mar 10 2007, 16:45
Give me a little while boys, I would like to help but I need to collect the stuff together, it isn&#39;t really that difficult, but there are complications, like p3d format etc.

I would like to help as it is all for the best of the community.


Planck

Linker Split
Mar 10 2007, 17:30
O.T.

Ehi Plnk, this is one question I would like to ask you:
How can you work with p3d, wrp, rtm and other file formats???
Do I need to have a good programming knowledge???
If for example I would discover other ArmA script commands, how can I do that???
plz answer me... its a question that from the beginning truly makes me curious&#33;
PM me plz...
Linker Split

deanosbeano
Mar 10 2007, 17:45
well nothing further i can do than what i done already, so gonna look forward to your information plank
i am glad you mention the p3d because i have tried everythin in config and my nooby little head hurts.

a video of what i managed (http://www.youtube.com/watch?v=2znsiykCGqk)
ps rear gunner proxy needed twisting 180 i did it but he still shot from the front lol

RKSL-Rock
Mar 10 2007, 18:20
well nothing further i can do than what i done already, so gonna look forward to your information plank
i am glad you mention the p3d because i have tried everythin in config and my nooby little head hurts.

a video of what i managed (http://www.youtube.com/watch?v=2znsiykCGqk)
ps rear gunner proxy needed twisting 180 i did it but he still shot from the front lol
I’ve got the same problem now, i had 2 turrets working at one point but since adding the 3rd it’s gone completely pear shaped and now none want to work.

Re the Tail gunner. I&#39;ve managed to get the proxies facing the right way but the gunner view point seem to be twisted either 180 or 75degrees off centre. I&#39;m still experimenting with settings right now. But it looks to be something about how the engine deals with the models rather than the settings, because individually all the turrets work normally, link them up and it all goes wrong&#33;.

deanosbeano
Mar 10 2007, 19:22
the weird thing is when you put all to same

source = "mainTurret";

you get in the working one and all 3 guns move in sync ,its very frustrating , i have to believe now that the only reason the uh can have 2 guns is because it uses two different guns.

that is :
gun1
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">weapons = {&#34;M134&#34;};[/QUOTE]
gun2
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">weapons = {&#34;M134_2&#34;};[/QUOTE]

surely that has to be an actual weapon and the _2 isnt just an apendix we can use is it ??
again here some more distinuguishin piece to the 2 guns

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">};

class AnimationSources&#58; AnimationSources {

class Gatling_1 {
source = &#34;reload&#34;;
weapon = &#34;M134&#34;;
};

class Gatling_2 {
source = &#34;reload&#34;;
weapon = &#34;M134_2&#34;;
};
};[/QUOTE]
well i tried m2_2 obviously there isnt one and it would need defining as a wepaon, altho after i re previewed i could move my head in the right and rear guns lol.
ok gonna wait for some proffesional advice now.

Marco-Polo-IV
Mar 10 2007, 20:38
you need
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgSkeletons
{
....
class MyHeli_Skeletons &#58; Helicopter
{
isDiscrete=1;
skeletonInherit=&#34;Helicopter&#34;;
skeletonBones&#91;&#93;=
{
&#34;turret1&#34;,&#34;&#34;
&#34;Gun1&#34;,&#34;turret1&#34;,
&#34;turret2&#34;,&#34;&#34;,
&#34;Gun2&#34;,&#34;turret2&#34;,
...
};
};
};
[/QUOTE]

the CfgModels
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgModels
{
...
class MyHeli &#58; Helicopter
{
sectionsInherit = &#34;Helicopter&#34;;
sections&#91;&#93; = {...};
skeletonName = &#34;MyHeli_Skeletons&#34;;
class Animations &#58; Animations
{
class mainTurret
{
type = &#34;rotationY&#34;;
source = &#34;mainTurret&#34;;
selection = &#34;turret1&#34;;
axis = &#34;osaveze&#34;;
animPeriod = 0;
memory = 1;
minValue = &#34;rad -360&#34;;
maxValue = &#34;rad +360&#34;;
angle0 = &#34;rad -360&#34;;
angle1 = &#34;rad +360&#34;;
};
class mainGun
{
type = &#34;rotationX&#34;;
source = &#34;mainGun&#34;;
selection = &#34;Gun1&#34;;
axis = &#34;osahlavne&#34;;
animPeriod = 0;
memory = 1;
minValue = &#34;rad -360&#34;;
maxValue = &#34;rad +360&#34;;
angle0 = &#34;rad -360&#34;;
angle1 = &#34;rad +360&#34;;
};
class Turret_Right &#58; mainTurret
{
selection = &#34;turret2&#34;;
axis = &#34;axis_turret2&#34;;
};
class TurretGun2 &#58; mainGun
{
selection = &#34;Gun2&#34;;
axis = &#34;axis_gun2&#34;;
};
};
};
};
[/QUOTE]

[APS]Gnat
Mar 11 2007, 03:08
Thought I also saw a "facing" parameter also ..... must have been in TeRps Sandbox in the BIKI (which for some reason is now empty&#33http://forums.bistudio.com/oldsmileys/wink_o.gif.
Something like DIRFACE or FACEDIR or .... something

RKSL-Rock
Mar 11 2007, 05:45
Gnat @<hidden> Mar. 11 2007,04:08)]Thought I also saw a "facing" parameter also ..... must have been in TeRps Sandbox in the BIKI (which for some reason is now empty&#33http://forums.bistudio.com/oldsmileys/wink_o.gif.
Something like DIRFACE or FACEDIR or .... something
Its just been moved to a proper BIKI page here:

How to animate a model by TeRp (http://community.bistudio.com/wiki/ArmA:_How_to_animate_a_model)

Planck
Mar 11 2007, 13:47
I might have misunderstood the problems stated in this topic, but having read it all again this is what I now understand it....

The problem seems to be getting more than one turret working properly, now, I haven&#39;t worked on any model that has more than one so unfortunately I can&#39;t offer much help there except to study the UH60MG config in Arma, which some of you have already done.

I also never needed to use any of this cfgSkeleton stuff that is evident on these pages, maybe I&#39;m doing something wrong there but I haven&#39;t come up against any big problems apart from crew proxy positions not being right.

For example the Mi24 crew sitting on top of the rotors.....etc, although the retracting undercarriage works fine.

Sorry I haven&#39;t been much help, real life gets in the way a lot nowadays.


Planck

CSJ
Apr 2 2007, 00:39
Quote[/b] ]i had 2 turrets working at one point

would you be so kind and post details of this?

I would like to get two working then I can worry about three.

RKSL-Rock
Apr 2 2007, 03:22
Quote[/b] ]i had 2 turrets working at one point

would you be so kind and post details of this?

I would like to get two working then I can worry about three.
Give me a few days and I&#39;ll release a 3 turret example. I just need to clean up the configs and replace the models with temp objects.

CSJ
Apr 2 2007, 04:33
Sweet
Much appreciated http://forums.bistudio.com/oldsmileys/notworthy.gif

W0lle
Apr 30 2007, 00:39
Moving to ArmA: configs & scripting

[APS]Gnat
May 7 2007, 15:18
Give me a few days and I&#39;ll release a 3 turret example. I just need to clean up the configs and replace the models with temp objects.
Any news on this Rock?

I have 2 nicely working turrets (1 cannon, 1 missile) on a ship except turret 2 will ONLY move in synch with turret 1 movement http://forums.bistudio.com/oldsmileys/crazy_o.gif
ie it copies the rotation and elevation of 1 but when you in turret 2 you can&#39;t get it to move, only fire http://forums.bistudio.com/oldsmileys/sad_o.gif

RKSL-Rock
May 7 2007, 17:50
Gnat @<hidden> May 07 2007,16:18)]
Give me a few days and I&#39;ll release a 3 turret example. I just need to clean up the configs and replace the models with temp objects.
Any news on this Rock?

I have 2 nicely working turrets (1 cannon, 1 missile) on a ship except turret 2 will ONLY move in synch with turret 1 movement  http://forums.bistudio.com/oldsmileys/crazy_o.gif
ie it copies the rotation and elevation of 1 but when you in turret 2 you can&#39;t get it to move, only fire http://forums.bistudio.com/oldsmileys/sad_o.gif
Sorry been a bit busy. I&#39;ll try and finish the demo model off and upload it asap.