Jump to content
Sign in to follow this  
vilas

problem with turret in helicopter

Recommended Posts

i have problem, asked few people on BI, maybe will start topic on config editing

following problem happens :

- when helicopter (gunship version) is "remodel of Mi24" all is okay

i mean :

vil_w3_pl : mi24_d {

model = model of W3 Gluszec

displayname W-3 Pl

crew = Polish pilot...

};

all works fine , but.. it uses Mi24 weapons (YakB) instead of my own NSV

but when i try own turret definion (a lot of problems of class inheritance)

bullets go straight

bullets do not follow gunner view point

body of gun rotates

sensor rotates

optic rotates

but bullets go straight like there was no movement at all

even if i use BIS weapon YakB - problem is because of turret problems

model is good - all selections are applied properly - because Mi24D class shows it

it not works ONLY when i define my own turret

what is most strange - turret turns, but bullets do not obey turret :/

class Air;

class Helicopter : Air

{

class Turrets

{

class MainTurret;

};

class NewTurret;

};

class VILAS_W3gunship_helicopter : Helicopter {

destrType="DestructWreck";

Icon = "\ca\air\data\map_ico\icomap_mi17_mg_CA.paa";

rotorBig = "velkavrtule";

rotorBigBlend = "velkavrtule_blur";

rotorSmall = "malavrtule";

rotorSmallBlend = "malavrtule_blur";

selectionHRotorStill = "velkavrtule_staticka";

selectionHRotorMove = "velkavrtule_blur";

selectionVRotorStill = "malavrtule_staticka";

selectionVRotorMove = "malavrtule_blur";

class AnimationSource {};

class UserActions {};

scope = 0;

SIDE=1;

driverAction = "Mi8_Pilot";

cargoAction[] = {"Mi8_Cargo", "Mi17_Cargo02"};

radarType=4;

LockDetectionSystem=8;

IncommingMisslieDetectionSystem=16;

minFireTime=30;

threat[]={0.8,1,0.6};

armor=30;

damageResistance=0.00138;

initCargoAngleY=10;

minCargoAngleY=-60;

maxCargoAngleY=120;

gunnerUsesPilotView=0;

cargoIsCoDriver[]={0,0};

driverCanSee=31;

gunnerCanSee=31;

memoryPointsGetInCargo[]={"pos cargo"};

memoryPointsGetInCargoDir[]={"pos cargo dir"};

weapons[] = {};

magazines[] = {};

supplyRadius = 2.5;

transportAmmo = 0;

transportMaxMagazines = 100;

transportMaxWeapons = 10;

dammageHalf[] = {};

dammageFull[] = {};

transportMaxBackpacks = 10;

transportSoldier = 10;

class Damage {

tex[] = {};

mat[] = {"vilas_npl\sw3.rvmat", "vilas_npl\sw3.rvmat", "vilas_npl\sw3_de.rvmat"};

};

class Turrets : Turrets {

class MainTurret : newTurret {

gunnerFireAlsoInInternalCamera= true;

gunnerOutFireAlsoinInternalCamera= true;

gunnerName = $STR_POSITION_GUNNER;

gunnergetInAction = "GetInMedium";

gunnergetOutAction = "GetOutMedium";

lockWhenDriverOut= false;

lockWhenVehicleSpeed= -1 ;

animationSourceHatch = "";

maxVerticalRotSpeed= 1.2;

maxHorizontalRotSpeed= 1.2;

proxyType = "CPGunner";

proxyIndex= 1 ;

memoryPointGun = "kulas";

animationSourceBody = "MainTurret";

animationSourceGun = "MainGun";

weapons[] = {"vil_wkmb", "AT9Launcher", "80mmLauncher"};

magazines[] = {"vil_w3pl_mag", "4Rnd_AT9_Mi24P", "40Rnd_80mm"};

minElev = -25;

maxElev = 4;

initElev = 0;

minTurn = -45;

maxTurn = 45;

initTurn = 0;

startEngine = 0;

soundServo[] = {"", db-40, 1.0};

gunnerOpticsColor[]= {0,0,0,1} ;

gunnerOpticsEffect[]= {} ;

gunnerOpticsModel = "\ca\weapons\2Dscope_HINDgun";

gunneroutOpticsColor[]= {0,0,0,1} ;

gunneroutOpticsEffect[]= {} ;

gunneroutOpticsModel = "";

viewGunnerInExternal= true ;

viewGunnerShadow= true ;

body = "OtocVez";

gun = "OtocHlaven";

gunBeg = "usti_hlavne";

gunEnd = "konec_hlavne";

class ViewGunner {

initAngleX = 5;

minAngleX = -65;

maxAngleX = 85;

initAngleY = 0;

minAngleY = -150;

maxAngleY = 150;

initFov = 0.7;

minFov = 0.25;

maxFov = 1.1;

};

class ViewOptics {

initAngleX = 5;

minAngleX = -30;

maxAngleX = 30;

initAngleY = 0;

minAngleY = 0;

maxAngleY = 0;

initFov = 0.4;

minFov = 0.1;

maxFov = 0.4;

};

gunnerCompartments= "Compartment2";

memoryPointGunnerOptics = "gunnerview";

gunnerAction = "Mi8_Cargo";

gunnerInAction = "Mi8_Cargo";

gunnerForceOptics = 0;

gunnerUsesPilotView= false;

hasgunner = 1;

primaryGunner = 1;

outGunnerMayFire = 1;

InGunnerMayFire= 1;

commanding = -1;

gunnerOutOpticsShowCursor= 1;

gunnerOpticsShowCursor= 0;

gunnerOutForceOptics= false;

castGunnerShadow = 0;

ejectDeadGunner= false;

hideWeaponsGunner= true;

forceHideGunner= false;

canHideGunner= 0;

viewGunnerShadowDiff= 1.0;

viewGunnerShadowAmb= 1.0;

stabilizedInAxes= "StabilizedInAxesBoth";

};

};

driverCompartments = "Compartment1";

cargoCompartments[] = {"Compartment2"};

};

class VIL_PL_W3_PL : VILAS_W3gunship_helicopter {

scope = 2;

vehicleClass = "VIL_polskie_vehair";

faction = "VIL_NWP_Army";

crew = "VIL_SOLDIER_NWP_PLT";

model = "\vilas_npl\vil_w3_pl";

displayName = PZL W-3PL;

irScanRangeMin = 0;

irScanRangeMax = 1000;

nightVision = true;

class Turrets: Turrets {

class MainTurret: mainTurret {

gunnerFireAlsoInInternalCamera= true;

gunnerOutFireAlsoinInternalCamera= true;

gunnerName = $STR_POSITION_GUNNER;

gunnergetInAction = "GetInMedium";

gunnergetOutAction = "GetOutMedium";

lockWhenDriverOut= false;

lockWhenVehicleSpeed= -1 ;

animationSourceHatch = "";

maxVerticalRotSpeed= 1.2;

maxHorizontalRotSpeed= 1.2;

proxyType = "CPGunner";

proxyIndex= 1 ;

memoryPointGun = "kulas";

animationSourceBody = "MainTurret";

animationSourceGun = "MainGun";

weapons[] = {"vil_wkmb", "AT9Launcher", "80mmLauncher"};

magazines[] = {"vil_w3pl_mag", "4Rnd_AT9_Mi24P", "40Rnd_80mm"};

minElev = -25;

maxElev = 4;

initElev = 0;

minTurn = -45;

maxTurn = 45;

initTurn = 0;

startEngine = 0;

soundServo[] = {"", db-40, 1.0};

gunnerOpticsColor[]= {0,0,0,1} ;

gunnerOpticsEffect[]= {} ;

gunnerOpticsModel = "\ca\weapons\2Dscope_HINDgun";

gunneroutOpticsColor[]= {0,0,0,1} ;

gunneroutOpticsEffect[]= {} ;

gunneroutOpticsModel = "";

viewGunnerInExternal= true ;

viewGunnerShadow= true ;

body = "OtocVez";

gun = "OtocHlaven";

gunBeg = "usti_hlavne";

gunEnd = "konec_hlavne";

class ViewGunner {

initAngleX = 5;

minAngleX = -65;

maxAngleX = 85;

initAngleY = 0;

minAngleY = -150;

maxAngleY = 150;

initFov = 0.7;

minFov = 0.25;

maxFov = 1.1;

};

class ViewOptics {

initAngleX = 5;

minAngleX = -30;

maxAngleX = 30;

initAngleY = 0;

minAngleY = 0;

maxAngleY = 0;

initFov = 0.4;

minFov = 0.1;

maxFov = 0.4;

};

gunnerCompartments= "Compartment2";

memoryPointGunnerOptics = "gunnerview";

gunnerAction = "Mi8_Cargo";

gunnerInAction = "Mi8_Cargo";

gunnerForceOptics = 0;

gunnerUsesPilotView= false;

hasgunner = 1;

primaryGunner = 1;

outGunnerMayFire = 1;

InGunnerMayFire= 1;

commanding = -1;

gunnerOutOpticsShowCursor= 1;

gunnerOpticsShowCursor= 0;

gunnerOutForceOptics= false;

castGunnerShadow = 0;

ejectDeadGunner= false;

hideWeaponsGunner= true;

forceHideGunner= false;

canHideGunner= 0;

viewGunnerShadowDiff= 1.0;

viewGunnerShadowAmb= 1.0;

stabilizedInAxes= "StabilizedInAxesBoth";

};

};

};

when i tried other inheritances of turret i get :

http://img241.imageshack.us/img241/1427/octt.jpg

so i tried 3 days and i gave up now

i cannot understand what is wrong

why bullets follow sight point when model is using Mi24 class , but not follows when own turret definition is made

Share this post


Link to post
Share on other sites

up, cause important for me :|

probably it is a matter of "inheritance order" of "turret {}; or turret; newturret or mainturret" etc.

i am really surprised, cause i made a lot of vehicles with turrets (mostly tanks, apc) and this gunship helicopter is really pain in the... i will have to make it "fixed" or "overpowered" if use Mi24 armament :/

Share this post


Link to post
Share on other sites

why do you not derive your class from the Mi24 then? Deriving from top level classes like Helicopter can be quite a hard task.

class mi24_d
{
class Turrets
{
	class MainTurret;
};
class NewTurret;
};
class VILAS_W3gunship_helicopter : mi24d
{
...
class Turrets : Turrets
{
	class MainTurret : MainTurret
	{
		...
	};
};
...
};



Edited by Soul_Assassin

Share this post


Link to post
Share on other sites

it not works too

bullets do follow aim (turret, rifle barrel, sight) only when class is directly inherited without defining own turret (which is must to arm it other way than Mi24 D)

not works, i tried :

class mi24_d

{

class Turrets

{

class MainTurret;

};

class NewTurret;

};

class VILAS_W3gunship_helicopter : mi24_d

{

rotorBig = "velkavrtule";

rotorBigBlend = "velkavrtule_blur";

rotorSmall = "malavrtule";

rotorSmallBlend = "malavrtule_blur";

selectionHRotorStill = "velkavrtule_staticka";

selectionHRotorMove = "velkavrtule_blur";

selectionVRotorStill = "malavrtule_staticka";

selectionVRotorMove = "malavrtule_blur";

class AnimationSource {};

class UserActions {};

scope = 0;

SIDE=1;

driverAction = "Mi8_Pilot";

cargoAction[] = {"Mi8_Cargo", "Mi17_Cargo02"};

radarType=4;

LockDetectionSystem=8;

IncommingMisslieDetectionSystem=16;

threat[]={0.8,1,0.6};

armor=30;

damageResistance=0.00138;

gunnerUsesPilotView=0;

cargoIsCoDriver[]={0,0};

memoryPointsGetInCargo[]={"pos cargo"};

memoryPointsGetInCargoDir[]={"pos cargo dir"};

class Turrets : Turrets

{

class MainTurret : MainTurret

{

animationSourceBody = "MainTurret";

animationSourceGun = "MainGun";

weapons[] = {"vil_wkmb", "AT9Launcher", "80mmLauncher"};

magazines[] = {"vil_w3pl_mag", "4Rnd_AT9_Mi24P", "40Rnd_80mm"};

minElev = -25;

maxElev = 4;

initElev = 0;

minTurn = -45;

maxTurn = 45;

initTurn = 0;

startEngine = 0;

body = "OtocVez";

gun = "OtocHlaven";

gunBeg = "usti_hlavne";

gunEnd = "konec_hlavne";

};

};

};

class VIL_PL_W3_PL2 : VILAS_W3gunship_helicopter {

scope = 2;

model = "\vilas_npl\vil_w3_pl";

displayName = PZL W-3PL(W);

irScanRangeMin = 0;

irScanRangeMax = 1000;

nightVision = true;

vehicleClass = "VIL_polskie_vehair";

faction = "VIL_NWP_Army";

crew = "VIL_SOLDIER_NWP_PLT";

};

bullets go straight

Share this post


Link to post
Share on other sites

try just this then:

class mi24_d
{
class Turrets
{
	class MainTurret;
};
class NewTurret;
};
class VILAS_W3gunship_helicopter : mi24_d
{
rotorBig = "velkavrtule";
rotorBigBlend = "velkavrtule_blur";
rotorSmall = "malavrtule";
rotorSmallBlend = "malavrtule_blur";
selectionHRotorStill = "velkavrtule_staticka";
selectionHRotorMove = "velkavrtule_blur";
selectionVRotorStill = "malavrtule_staticka";
selectionVRotorMove = "malavrtule_blur";
class AnimationSource {};
class UserActions {};
scope = 0;
SIDE=1;
driverAction = "Mi8_Pilot";
cargoAction[] = {"Mi8_Cargo", "Mi17_Cargo02"};

radarType=4;
LockDetectionSystem=8;
IncommingMisslieDetectionSystem=16;

threat[]={0.8,1,0.6};
armor=30;
damageResistance=0.00138;

gunnerUsesPilotView=0;
cargoIsCoDriver[]={0,0};

memoryPointsGetInCargo[]={"pos cargo"};
memoryPointsGetInCargoDir[]={"pos cargo dir"};

class Turrets : Turrets
{
	class MainTurret : MainTurret
	{
		weapons[] = {"vil_wkmb", "AT9Launcher", "80mmLauncher"};
		magazines[] = {"vil_w3pl_mag", "4Rnd_AT9_Mi24P", "40Rnd_80mm"};
	};
};

}; 


class VIL_PL_W3_PL2 : VILAS_W3gunship_helicopter 
{
scope = 2;
model = "\vilas_npl\vil_w3_pl";
displayName = PZL W-3PL(W);
irScanRangeMin = 0;
irScanRangeMax = 1000;
nightVision = true;
vehicleClass = "VIL_polskie_vehair";
faction = "VIL_NWP_Army";
crew = "VIL_SOLDIER_NWP_PLT";

};

i.e. just redefine weapons and magazines in the class, nothing else. I suspect that ur also getting some errors in the rpt, concerning the turret.

Share this post


Link to post
Share on other sites

of course i did it , but not works

i ll send you on PM link to MLOD and you can check yourself that it not works , something is wrong and it require inherit from Helicopter class, RKLS also tries solve it , but not solved yet :(

Share this post


Link to post
Share on other sites

Suggest;

class mi24_d 
{ 
   class Turrets;
   class NewTurret;
class AnimationSources;
}; 
class VILAS_W3gunship_helicopter : mi24_d 
{ 
......
......
......
   class Turrets 
   { 
       class MainTurret : NewTurret
       {
       body = "mainturret";
       gun = "maingun";
       animationSourceBody = "mainturret";
       animationSourceGun = "maingun";
       gunBeg = "S_start";
       gunEnd = "S_end"; 
           .......
           ....... 
       }; 
   }; 

};  

Change "body", "gun", "S_Start", "AnimationSourceBody" etc to whatever you use.

Edited by [APS]Gnat

Share this post


Link to post
Share on other sites

i tried almost all

maybe i will send you MLOD too and you will test yourself if it works

as i remember i was trying such configuration and had the same issue (when defining any turret)

you will see that model should be okay (memory points)

PM

Share this post


Link to post
Share on other sites

PM backed.

Seems fixed.

Main changes I think are;

Model.cfg

		class MainTurret
		{
			type="rotationY";
			source="mainTurret";
			selection="OtocVez";
			axis="OsaVeze";
			animPeriod=0;
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
		};
		class MainGun: MainTurret
		{
			type="rotationX";
			source="mainGun";
			selection="OtocHlaven";
			axis="OsaHlavne";
		};

Config.cpp

class CfgVehicles
{
class Air;
class Helicopter : Air
{
	class NewTurret;
	class AnimationSources;
	class ViewPilot;
	class Turrets;
	class MainTurret;
};

class VILAS_W3gunship_helicopter : Helicopter
{
....
....

and

	class Turrets {
		class MainTurret : NewTurret {
			startEngine = 0;
			outGunnerMayFire = 1;
			commanding = -1;
			primary = 1;
			gunBeg = "usti_hlavne";
			gunEnd = "konec_hlavne";
			memoryPointGun = "kulas";
			memoryPointGunnerOptics = "gunnerview";
....
....

Share this post


Link to post
Share on other sites

yes, thanx, it works

class Helicopter : Air

{

class NewTurret;

class AnimationSources; <<<<<<<< probably this was whole issue

class ViewPilot;

class Turrets;

class MainTurret;

};

i even not changed model (binarising it again) and it WORK

so model wouldn't even get changed, only this inheritance changed and it works

so seems that issue was inheritance of main class helicopter ?

cause i applied this and it started to work

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  

×