Jump to content
Sign in to follow this  
Ex-RoNiN

Need help with an addon-edit

Recommended Posts

The problem is here:

class CfgAmmo

{

class Default {};

class BulletSingle: Default {};

class ExplosiveBullet: BulletSingle {};

class Bullet4x23: ExplosiveBullet {};

class ExR_Bullet4x23: Bullet4x23 {};

{

hit=40; indirectHit=20; indirectHitRange=2;

minRange=20;minRangeProbab=0.80;

midRange=500;midRangeProbab=0.95;

maxRange=3000;maxRangeProbab=0.05;

cost=30;

};

};

Take that bracket out in bold.

It should look like this:

class CfgAmmo

{

class Default {};

class BulletSingle: Default {};

class ExplosiveBullet: BulletSingle {};

class Bullet4x23: ExplosiveBullet {};

class ExR_Bullet4x23: Bullet4x23

{

hit=40; indirectHit=20; indirectHitRange=2;

minRange=20;minRangeProbab=0.80;

midRange=500;midRangeProbab=0.95;

maxRange=3000;maxRangeProbab=0.05;

cost=30;

};

};

Share this post


Link to post
Share on other sites

Ah I see!

I am now paying for my sleeping throug most of my Object Oriented Programming lectures crazy_o.gif

Share this post


Link to post
Share on other sites

By the way, just to recap: I have given it my own classname, and if I leave the pathnames alone and change the file name, I have an addon dependency that requires the original UFO for it to work correctly, correct?

Share this post


Link to post
Share on other sites

Correct.  If you leave the pathnames pointing to the original UFO .pbo file, then the original file will have to be placed into your addons folder in order for your modification to work.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soundEngine[]={"Vehicles\01F5",0.850,0.320};

If I want to change this, I assume I replace "Vehicles" with my own filename, and give the full filename, such as "engine.ogg"?

Share this post


Link to post
Share on other sites

Yes.

It should look something like

soundEngine[]={"\UFO\Engine.ogg",0.850,0.320};

Just so you know, the first number after the filename controls how loud the sound is and the second number controls the pitch.

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soundEngine[]={"Vehicles\01F5",0.850,0.320};

If I want to change this, I assume I replace "Vehicles" with my own filename, and give the full filename, such as "engine.ogg"?

Yup.

Sorry about the extra {};

not very helpful when doing this sort of thing. My bad sad_o.gif

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soundEngine[]={"Vehicles\01F5",0.850,0.320};

If I want to change this, I assume I replace "Vehicles" with my own filename, and give the full filename, such as "engine.ogg"?

Yup.

Sorry about the extra {};

not very helpful when doing this sort of thing. My bad sad_o.gif

ROFL, are you kidding, you were great help, just like dharbert, you will both get mentioned in the readme smile_o.gif

Its my bad too, if I hadnt slept in my OO Programming lectures, I would have seen it straight away wink_o.gif

If I want to change gun sounds, I have to include the lines in the default class, don't I? Or in the weapons/ammo classes?

Share this post


Link to post
Share on other sites

Gah, any ideas how I can avoid the engine sounding terribly loopy? crazy_o.gif

Share this post


Link to post
Share on other sites
Gah, any ideas how I can avoid the engine sounding terribly loopy? crazy_o.gif

Get a sound that loops well tounge_o.gif

As for the gun sounds, they are in the cfgweapons class, you have to change them in your little sub class (you can only change the default class by changing the entire game config)

from the machinegun30 (from which the zsu inherits):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sound[]={"Weapons\automatic_cannon",db10,1};

add that line to your weapons' config, and change the sound to one of your choosing.

Share this post


Link to post
Share on other sites

Yupp, got it to work smile_o.gif

The engine sound is a bit annoying, but I just decided that its a feature biggrin_o.gif

Its good enough for now smile_o.gif Anybody want it? (Have no webspace though)

Share this post


Link to post
Share on other sites

I've had to fix a few addons with that annoying clicking/popping sound in the engine. I use GoldWave to fix them. It has a hiss/pop reduction feature. Or, if it's a .wav file you can simply use Windows built-in Audio Recorder to cut out the bad part so it will loop correctly, I've had to do that as well.

I've got webspace if you can get the file to me.

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  

×