Skip to content

Instantly share code, notes, and snippets.

@maximilionus
Last active July 2, 2019 16:12
Show Gist options
  • Save maximilionus/52813374cc561c98556bf05a8cef58a5 to your computer and use it in GitHub Desktop.
Save maximilionus/52813374cc561c98556bf05a8cef58a5 to your computer and use it in GitHub Desktop.
ArmA 2/3 Map Config - adding Ambient sounds to map
/***
Header file shoud be included in main map config.cpp in your's map class name:
class MySuperMap
{
#include "amap_sound_ambient.hpp"
};
Or you can just copy-paste it :)
***/
class EnvSounds
{
class Default
{
name="$STR_CFG_ENVSOUNDS_DEFAULT";
sound[]=
{
"$DEFAULT$",
0,
1
};
soundNight[]=
{
"$DEFAULT$",
0,
1
};
};
class Sea //Location where selected ambient sound will play
{
name="Sea";
volume="sea";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_sea.ogg", //Path to daytime sound
0.30000001, //Sound volume
1
};
soundNight[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_sea.ogg", //Path to nighttime sound
0.30000001, //Sound volume
1
};
};
class WindForestHigh
{
name="Wind";
volume="forest*(windy factor[0,1])*(0.1+(hills factor[0,1])*0.9)-(night*0.25)";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_highz.ogg",
0.30000001,
1
};
};
class WindNoForestHigh
{
name="Wind";
volume="(1-forest)*(windy factor[0,1])*(0.1+(hills factor[0,1])*0.9)-(night*0.25)";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_highz.ogg",
0.30000001,
1
};
};
class Forest
{
name="Forest";
volume="forest*(1-night)";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_hills.ogg",
0.30000001,
1
};
};
class ForestNight
{
name="Forest";
volume="forest*night";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_night.ogg",
0.30000001,
1
};
};
class Houses
{
name="Houses";
volume="(houses*0.75)*4";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_houses.ogg",
0.30000001,
1
};
};
class Meadows
{
name="Meadows";
volume="(1-forest)*(1-houses)*(1-night)*(1-sea)";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_hills.ogg",
0.30000001,
1
};
};
class MeadowsNight
{
name="Meadows";
volume="(1-forest)*(1-houses)*night*(1-sea)";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_night.ogg",
0.30000001,
1
};
};
class Hills
{
name="Hills";
volume="hills";
sound[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_hills.ogg",
0.30000001,
1
};
soundNight[]=
{
"Dev_Island\Dev_sounds\env\env_Dev_night.ogg",
0.30000001,
1
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment