Jump to content
Sign in to follow this  
max power

Fixed cannon on helicopter refuses to fire from the muzzle.

Recommended Posts

Hey, I've got a problem here that's defying my troubleshooting skills. It's the simplest thing.

We have a helicopter here with a fixed, forward firing gun and one pilot. The game refuses to use the 'machinegun' memorypoint as the origin of the bullets and particles. So, I tried defining the beginning and end of the cannon as well, and there was still no effect on the origin of the bullets. They are emanating from the model's local space origin.

class cwr2_V80 : Helicopter //ka50 (kamov)
{
	accuracy = 1;
	armor = 70;
	audible = 6.5;
	backRotorSpeed = 1.0;
	castDriverShadow = 1;
	cost = 4000000;
	crew = "cwr2_SoldierE_Pilot";
	crewVulnerable = 0;
	damageResistance = 0.006350;
	destrType = "DestructWreck";
	displayName = "V-80";
	driverAction = "KA50_Pilot";
	driverInAction = "KA50_Pilot";
	driverOpticsColor[] = {0,0,0,1 };
	driverOpticsModel = "\ca\air\optika_Ka50_rocket.p3d";
	faction = cwr2_ru;
	gearRetracting = 1;
	hasGunner = 0;
	hiddenSelections[] = {"camo1", "camo2"};
	hiddenSelectionsTextures[] = {"\ca\air2\ka52\data\ka52_01_RU_co.paa", "\ca\air2\ka52\data\ka52_02_RU_co.paa"};
	icon = PBO_PREFIX\data\picture\icomap_ka50_CA.paa;
	laserScanner = 1;
	mainRotorSpeed = 1.0;
	mapSize = 12;
	maxMainRotorDive = 7;
	maxSpeed = 400;

		memoryPointGun = "machinegun";
		gunBeg = usti hlavne;
		gunEnd = konec hlavne;

	minMainRotorDive = -7;
	MODEL(cwr2_v80);
	nameSound = "kamov";
	neutralMainRotorDive = 0;
	picture = PBO_PREFIX\data\picture\i_ka50_ca.paa;
	PUBLIC;
	EASTERN;
	radartype = 4;

		selectionfireanim = "zasleh";

	selectionHRotorMove = "velka vrtule blur";
	selectionHRotorStill = "velka vrtule staticka";
	selectionVRotorMove = "mala vrtule blur";
	selectionVRotorStill = "mala vrtule staticka";
               [..]
	threat[] = {0.6, 1, 0.8};
	typicalCargo[] = {"cwr2_SoldierE_Pilot"};
	vehicleClass = Cwr2GroupAir;   
	viewCargoShadow = true;

		weapons[] = {"cwr2_2A42","cwr2_80mmLauncher","cwr2_VikhrLauncher"};
		magazines[] = {"cwr2_250Rnd_30mm_AP_2A42", "cwr2_230Rnd_30mm_HE_2A42","cwr2_40Rnd_80mm","cwr2_12Rnd_Vikhr"};

               [...]

              class Turrets  {};

I also tried with the muzzle begin and end arrays a la the bis ah-6 but still no joy. Does anyone know what could be the problem?

Share this post


Link to post
Share on other sites

I had this one with planes too. The last time it was a "corrupt selection or model" - at least that is what i seemed like at the end. I'm not saying this solution will work for you but it worked when i helped Franze on the F-18, my Typhoon and our Puma.

  1. Delete all reference to the selection in the model. Including the vertex you are using.
  2. Open a 2nd O2 session and copy and paste each LoD over.
  3. Save the "new" model.
  4. Close the old one and rename it. - You'll only use this one as a backup.
  5. In the "new" model create the selection as you would normally.

It should work. Just a as a check you might notice a difference in file size between the two models. I'm not saying this is always the cause but I've had the issue quite a lot before with O2 models over the years.

Anyway its worth a try and it only takes 5 mins.

Share this post


Link to post
Share on other sites

hmm maybe try . i saw it like tjjis when otside of turrets before, i thought maybe because its an array tho and used when two poibnts are named. however maybe other reason is to define when not in a turret

gunBeg[] = {"usti hlavne"};

gunEnd[] = {"konec hlavne"};

Share this post


Link to post
Share on other sites

Actually Thromp maybe right one that one. I wouldnt use the brackets but the "..." is right since it has a space in the selection name.

Share this post


Link to post
Share on other sites

Thanks for the quick replies, all!

I did try with the arrays but they didn't work either, so I did different combinations of things and ended up with this you see here.

I'll give the arrays another try again and if that doesn't work, I'll give Rock's solution a go. Thanks again for the info, guys!

Share this post


Link to post
Share on other sites

I had lots of problem myself lately in addition to RKSL hint also remember ,

Might be me but seems ,thing matter more these days

Type = ..

Simulation =

In ammo weapons magazine everything ,it's a minefield .

Good luck

Share this post


Link to post
Share on other sites

well our ammo, magazine, and weapon configs are already finished but I'll take a closer look. It's probably inheriting from the black shark's cannon which is turreted, so we'll have to see if that is a factor.

Share this post


Link to post
Share on other sites

Hmmm... Neither of them worked. I recreated the arrays, then I recreated the p3d. After that, I exported the p3d as a text and re-imported and there was still no change.

Edited by Max Power

Share this post


Link to post
Share on other sites

hmm look like one of those glaryingly obvious things you can never see, i hate those.

anyway my last guess would be to maybe delcare your weapons before the gunbeg /end and memory point , long shot but ive known things like this to count before.

Share this post


Link to post
Share on other sites

Thanks again for the advice! I reordered the config but still the same issue. It's a toughy!

Share this post


Link to post
Share on other sites

hmm

i hate commenting on these kind of problems because the law of averages says its something glaryingly obvious lol,.

however i would start by thinking outside the box now probably for sake of elimination the obvious is done.

so

driverOpticsModel = "\ca\air\optika_Ka50_rocket.p3d";

hmm maybe this is negating the memory point ?

is there any weights on the memorypoint , is it tied to some hidden selection by mistake and is hidden ?

in A2 everything is usually inherited form a type_base rather than direct from helicopter , could be some inheritance lost ?

the names of the deafult bis ones are called Muzzle_flash which makes me wonder are they actually a point or a proxy maybe ( absolute Longshot lol).

in line with above i wonder if Kulas or kulomet are still engine tied for Air guns ? totally guesswork .

what Lods are you using view pilot Lod ?

that would be me finished guessing now lol .

Edited by Thromp

Share this post


Link to post
Share on other sites

class 2A42;// External class reference

class 2A42_KA50 : 2A42 {

scope = public;

displayName = $STR_DN_2A42;

nameSound = "cannon";

burst = 5;

reloadTime = 0.02;

autoFire = true;

magazines[] = {"150Rnd_30mmAP_2A42", "150Rnd_30mmHE_2A42", "230Rnd_30mmAP_2A42", "230Rnd_30mmHE_2A42", "250Rnd_30mmAP_2A42", "250Rnd_30mmHE_2A42"};

modes[] = {"LowROF", "HighROF", "close", "short", "medium", "far"};

shotFromTurret = 0;

canLock = LockYes;

cursor = "Air_W_MG";

cursorAim = "Air_W_MG";

cursorSize = 1;

};

Share this post


Link to post
Share on other sites

Perfect, rstratton! That works great. Thanks to everyone for their help!

Share this post


Link to post
Share on other sites

It could have been written in that font and I still wouldn't of got it lol, damn weapon cfg

Bravo mr Stratton that's going in my long checklist when something don't 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  

×