diff --git a/A3A/addons/core/functions/Base/fn_initPetros.sqf b/A3A/addons/core/functions/Base/fn_initPetros.sqf index 5bb4586507..ef3ffaf948 100644 --- a/A3A/addons/core/functions/Base/fn_initPetros.sqf +++ b/A3A/addons/core/functions/Base/fn_initPetros.sqf @@ -24,6 +24,8 @@ if (petros == leader group petros) then { petros setBehaviour "SAFE"; }; +call A3A_fnc_unitAmbient; // adds ambient sounds to petros + // Install both moving and static actions [petros,"petros"] remoteExec ["A3A_fnc_flagaction", 0, petros]; diff --git a/A3A/addons/patcom/CfgFunctions.hpp b/A3A/addons/patcom/CfgFunctions.hpp index 2b7f4b070c..ed96cb014f 100644 --- a/A3A/addons/patcom/CfgFunctions.hpp +++ b/A3A/addons/patcom/CfgFunctions.hpp @@ -20,6 +20,7 @@ class CfgFunctions { class createResourceCiv {}; class createRoomLight {}; class getDayState {}; + class unitAmbient {}; }; class Patcom { diff --git a/A3A/addons/patcom/CfgSounds.hpp b/A3A/addons/patcom/CfgSounds.hpp index bfbf08ca80..bcd9931fa4 100644 --- a/A3A/addons/patcom/CfgSounds.hpp +++ b/A3A/addons/patcom/CfgSounds.hpp @@ -259,4 +259,81 @@ class CfgSounds sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Fear\fear6.ogg), 0.8, 1, 40}; titles[] = {}; }; + + class A3A_Audio_Petros_Ambient_Coughing1 + { + name = "A3A_Audio_Petros_Ambient_Coughing1"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Coughing1.ogg), 3, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Coughing2 + { + name = "A3A_Audio_Petros_Ambient_Coughing2"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Coughing2.ogg), 1, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Scratching + { + name = "A3A_Audio_Petros_Ambient_Scratching"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Scratching.ogg), 4, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Whistle1 + { + name = "A3A_Audio_Petros_Ambient_Whistle1"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Whistle1.ogg), 4, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Whistle2 + { + name = "A3A_Audio_Petros_Ambient_Whistle2"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Whistle2.ogg), 2.5, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Yawn1 + { + name = "A3A_Audio_Petros_Ambient_Yawn1"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Yawn1.ogg), 2.5, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Yawn2 + { + name = "A3A_Audio_Petros_Ambient_Yawn2"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Yawn2.ogg), 4, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_ThroatClearing + { + name = "A3A_Audio_Petros_Ambient_ThroatClearing"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\ThroatClearing.ogg), 4.5, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Humming + { + name = "A3A_Audio_Petros_Ambient_Humming"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Humming.ogg), 5, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Sniffling + { + name = "A3A_Audio_Petros_Ambient_Sniffling"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Sniffling.ogg), 5, 1, 40}; + titles[] = {}; + }; + + class A3A_Audio_Petros_Ambient_Breathing + { + name = "A3A_Audio_Petros_Ambient_Breathing"; + sound[] = {EQPATHTOFOLDER(patcom,sounds\Civilian\Ambient\Breathing.ogg), 5, 1, 40}; + titles[] = {}; + }; }; \ No newline at end of file diff --git a/A3A/addons/patcom/functions/Civilian/fn_unitAmbient.sqf b/A3A/addons/patcom/functions/Civilian/fn_unitAmbient.sqf new file mode 100644 index 0000000000..31b8f24964 --- /dev/null +++ b/A3A/addons/patcom/functions/Civilian/fn_unitAmbient.sqf @@ -0,0 +1,54 @@ +/* + Author: Maxx + Description: + Creates a ambient sounds from Petros. + + Arguments: + Nil. + + Return Value: + Petros + + Scope: Any + Environment: Any + Public: No + + Example: + call A3A_fnc_unitAmbient; + +*/ + +private _musicSource = petros; + +[_musicSource] spawn { + params ["_musicSource"]; + // name of the sound file in CfgSounds.hpp + private _ambientSounds = + [ + "A3A_Audio_Petros_Ambient_Coughing1", + "A3A_Audio_Petros_Ambient_Coughing2", + "A3A_Audio_Petros_Ambient_Scratching", + "A3A_Audio_Petros_Ambient_Whistle1", + "A3A_Audio_Petros_Ambient_Whistle2", + "A3A_Audio_Petros_Ambient_Yawn1", + "A3A_Audio_Petros_Ambient_Yawn2", + "A3A_Audio_Petros_Ambient_Humming", + "A3A_Audio_Petros_Ambient_Sniffling", + "A3A_Audio_Petros_Ambient_ThroatClearing", + "A3A_Audio_Petros_Ambient_Breathing" + ]; + + while { (alive _musicSource) } do { + private _sound = selectRandom (_ambientSounds); + + [_musicSource, _sound] remoteExec ["say3D", [1, _musicSource], true]; + + sleep 900; + + if not (alive _musicSource) exitWith {}; + + sleep (random 10); + }; +}; + +_musicSource \ No newline at end of file diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Breathing.lip b/A3A/addons/patcom/sounds/Civilian/Ambient/Breathing.lip new file mode 100644 index 0000000000..470de19f0a --- /dev/null +++ b/A3A/addons/patcom/sounds/Civilian/Ambient/Breathing.lip @@ -0,0 +1,29 @@ +frame = 0.040 +0.000, 0 +1.080, 1 +1.120, 0 +1.160, 1 +1.200, 0 +1.880, 1 +1.920, 3 +1.960, 4 +2.000, 7 +2.040, 4 +2.080, 3 +2.240, 2 +2.320, 1 +2.400, 2 +2.440, 3 +2.480, 1 +2.600, 2 +2.640, 1 +2.720, 2 +2.760, 1 +2.800, 2 +2.840, 1 +2.880, 0 +2.960, 1 +3.080, 0 +3.240, 1 +3.280, 0 +4.840, -1 diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Breathing.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Breathing.ogg new file mode 100644 index 0000000000..d499aef8be Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Breathing.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing1.lip b/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing1.lip new file mode 100644 index 0000000000..11a6e2f5be --- /dev/null +++ b/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing1.lip @@ -0,0 +1,34 @@ +frame = 0.040 +0.000, 0 +1.000, 2 +1.040, 3 +1.080, 2 +1.120, 1 +1.280, 3 +1.320, 1 +1.360, 0 +1.760, 1 +1.880, 0 +2.000, 1 +2.080, 0 +3.240, 3 +3.280, 6 +3.320, 2 +3.400, 3 +3.440, 2 +3.480, 3 +3.520, 7 +3.560, 0 +3.720, 1 +3.760, 2 +3.880, 1 +3.920, 2 +3.960, 3 +4.000, 0 +4.360, 1 +4.480, 0 +4.920, 2 +4.960, 1 +5.120, 2 +5.200, 0 +6.200, -1 diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing1.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing1.ogg new file mode 100644 index 0000000000..e04a12e1da Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing1.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing2.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing2.ogg new file mode 100644 index 0000000000..fbd5df6cb1 Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Coughing2.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Humming.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Humming.ogg new file mode 100644 index 0000000000..35ce1d88a8 Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Humming.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Scratching.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Scratching.ogg new file mode 100644 index 0000000000..8570bd8f41 Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Scratching.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Sniffling.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Sniffling.ogg new file mode 100644 index 0000000000..a5676d935e Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Sniffling.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/ThroatClearing.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/ThroatClearing.ogg new file mode 100644 index 0000000000..192f38a3ef Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/ThroatClearing.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Whistle1.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Whistle1.ogg new file mode 100644 index 0000000000..da9c8c37b6 Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Whistle1.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Whistle2.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Whistle2.ogg new file mode 100644 index 0000000000..a8bcefca91 Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Whistle2.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn1.lip b/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn1.lip new file mode 100644 index 0000000000..4b41f3b776 --- /dev/null +++ b/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn1.lip @@ -0,0 +1,23 @@ +frame = 0.040 +0.000, 0 +2.080, 2 +2.120, 4 +2.240, 3 +2.320, 5 +2.360, 3 +2.400, 7 +2.440, 6 +2.480, 4 +2.560, 3 +2.600, 4 +2.640, 2 +2.680, 0 +3.480, 1 +3.520, 2 +3.560, 3 +3.640, 4 +3.680, 1 +3.920, 0 +4.640, 1 +4.680, 0 +5.160, -1 diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn1.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn1.ogg new file mode 100644 index 0000000000..0aa744cb63 Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn1.ogg differ diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn2.lip b/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn2.lip new file mode 100644 index 0000000000..4770fb2002 --- /dev/null +++ b/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn2.lip @@ -0,0 +1,39 @@ +frame = 0.040 +0.000, 0 +1.360, 1 +1.440, 0 +1.760, 1 +1.800, 2 +1.840, 3 +1.880, 1 +1.920, 2 +1.960, 3 +2.000, 2 +2.120, 1 +2.160, 2 +2.200, 1 +2.240, 0 +2.960, 1 +3.000, 2 +3.040, 1 +3.120, 2 +3.240, 3 +3.280, 2 +3.320, 3 +3.400, 1 +3.480, 0 +4.760, 1 +4.840, 2 +4.920, 1 +4.960, 2 +5.000, 3 +5.040, 5 +5.080, 7 +5.120, 2 +5.200, 1 +5.240, 0 +5.520, 1 +5.600, 0 +5.640, 1 +5.720, 0 +6.480, -1 diff --git a/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn2.ogg b/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn2.ogg new file mode 100644 index 0000000000..99d60e376b Binary files /dev/null and b/A3A/addons/patcom/sounds/Civilian/Ambient/Yawn2.ogg differ