Frictional Games Forum (read-only)

Full Version: Ambient sound
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.
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();
}