Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ambient sound
Henriksen Offline
Senior Member

Posts: 308
Threads: 71
Joined: Dec 2010
Reputation: 2
#1
Ambient sound

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
05-31-2011, 12:46 PM
Find
cook Offline
Member

Posts: 103
Threads: 6
Joined: Apr 2011
Reputation: 0
#2
RE: Ambient sound

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.
(This post was last modified: 05-31-2011, 12:52 PM by cook.)
05-31-2011, 12:52 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#3
RE: Ambient sound

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:

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();
}

05-31-2011, 11:00 PM
Find




Users browsing this thread: 2 Guest(s)