Frictional Games Forum (read-only)
Ambience noises. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Ambience noises. (/thread-9095.html)



Ambience noises. - Angerpull - 07-12-2011

Hello! I am working on my custom story. And I was wondering how I can place other Ambience sounds such as a prisoner screaming and footsteps like in the original Amnesia.

I can only seem to place down a Ambience sound into the Editor using it's Sounds Tool, but I have no idea how to make other noises. Like footsteps and cries etc.

Is it an easy way to do it, or do I need to go on a hardcore scripting adventure?

Angerpull Angel


RE: Ambience noises. - DRedshot - 07-12-2011

its not too hard, just use
PlaySoundAtEntity(string name , string soundfile , string entity , float fadeintime , bool savesound);
Its pretty easy to do this, just place two script areas, one where you collide with, and one where the sound willl come from, and use
Code:
void OnStart()
{
AddEntityCollideCallback("Player" , "scriptarea_1" , "Collide" , true , 1);
}
void Collide(string &in asParent , string &in asChild , int &in alState)
{
PlaySoundAtEntity("MySpookySound" , "23_sawvoices1" , "scriptarea_2" , false);
}
but to make more randomised sounds you should use timers, so the player could be anywhere when the sound starts, just to make it seem a bit less scripted! Big Grin