Frictional Games Forum (read-only)
Ambient sound - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Ambient sound (/thread-8360.html)



Ambient sound - Henriksen - 05-31-2011

Hi, I was wondering how i make the player make random sounds like breathing heavely every once in a while and so on and it should be random without having to enter any areas
Please help a n00b? xD


RE: Ambient sound - cook - 05-31-2011

Post this in the Custom Stories section - and search for a thread called Advanced Script Widgets or just type script in search - there's an actual copy of exactly what you want in one of those threads.


RE: Ambient sound - Kyle - 05-31-2011

It's simpler when using one sound and not so advanced as the one in the advanced script widgets thread.

This is what you can use:

Code:
void OnStart()
{
     Breathe();
}
void Breathe()
{
     int x = RandInt(5, 15);
     PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
     AddTimer("", x, Breathe2");
}
void Breathe2(string &in asTimer)
{
     Breathe();
}