Jump to content

Sign in to follow this  
drunken officer

How to load own engine sound?

Recommended Posts

How can i load a own engine sound. I did it in my config.cpp, but it's not working

Here is the code:

class CfgSounds{
class motor1{
name = "motor1";
sound[] = {"\sportcar\sounds\motor.ogg", db-5, 1};
titles[] = {};
};
};
class CfgVehicles {
class LandVehicle;
class Car : LandVehicle {};

class VWGolf : car {};
class carbase: VWGolf {....
             soundEngine[]={\ca\wheeled\Data\Sound\4WD_Loop4,db-35,1.2};
	soundGear[]={\ca\wheeled\Data\Sound\shifter_v2,db-75,1};
	SoundGetIn[]={\ca\wheeled\Data\Sound\4WD_DoorOpenClose1,db-20,1};
	SoundGetOut[]={\ca\wheeled\Data\Sound\4WD_DoorOpenClose1,db-30,1};
	getInAction=GetInLow;
	getOutAction = GetOutLow;



.....};
         class sportcar1
         {...
          soundEngine[]= {"motor1"}; //here i tried the same folder like the cfgsounds, but it not working. I here the standart sound.
           ...};

Share this post


Link to post
Share on other sites

Class cfgvehicles{
 Class car ;
 Class sportscar1: car
{
 .......
Soundengine []= "same path as in cfg sounds but reall needs to be 16 bit mono .wss file ";

..............};

You don't need cfg sounds

Share this post


Link to post
Share on other sites

soundEngine[] =

This will only work if class sounds of said vehicle is correctly configured to use the soundEngine parameter. With Arma2 a new sound engine came into place that allows you to configure as many sounds as you like for as many conditions as you like. This way you can have multiple engine sounds for different RPM states of the vehicles engine.

class Sounds: Sounds
 {
  class Engine: Engine
  {
   sound[] = {"ca\sounds\Vehicles\Wheeled\UAZ\ext\ext-uaz-engine-low",1.0,1.0,300};
   frequency = "(randomizer*0.05+0.95)*rpm";
   volume = "camPos*engineOn*((rpm factor[0.5, 0.7]) min (rpm factor[0.7, 0.5]))";
  };
  class EngineHighOut
  {
   sound[] = {"ca\sounds\Vehicles\Wheeled\UAZ\ext\ext-uaz-engine-high-1",0.7943282,1.0,400};
   frequency = "(randomizer*0.05+0.95)*rpm";
   volume = "camPos*engineOn*(rpm factor[0.4, 0.9])";
  };

Share this post


Link to post
Share on other sites

Okay, you're using this code

class Sounds: Sounds

That means, i've to define it before. What i've to do? Load it in the cfgVehilce as "basic sound" ?

...
class Sounds;
class cfgvehilce
{....

Share this post


Link to post
Share on other sites

No, just follow basic inheritance rules:

class CfgVehicles
{
class LandVehicle;
class Car: LandVehicle
{
	class Sounds;
};

class ABC_TheDoomMachine_4WD: Car
{
	class Sounds: Sounds
	{
		blahblahba
	};
};
};

Share this post


Link to post
Share on other sites

Okay, the original sound is gone, but now i can hear nothing. I turned up the volume, nothing.

Other question:

I can hear my sirens and after 650 m it's quiet. Yes, that was i want. But when i'm inside my car or a other car, it's really really hard to hear. You must turn up the volume...

The sounds are actived by script.

cfgsounds

{

name = "sirene";

sound[] = {"\policecar\sounds\sirnebmw.ogg", db-5, 1};

titles[] = {};

};

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  

×