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
Script Help Random Looped Sound
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#2
RE: Random Looped Sound

void FunctionTimer(string &in asTimer)
{
int iArea = RandFloat(1, 7); <--- if you want the sound to be played at different areas: insert the number of areas.
float fTime = RandFloat(4.5f,7.5f); <--- insert the number of seconds between timers, in your case 15.0f and 25.0f

PlaySoundAtEntity("NameOfSoundInGame"+iArea , "NameOfSound.snt", "AreaWhereTheSoundPlays"+iArea , 0.0f, false);

AddTimer("TimerName", 5.5f+fTime , "FunctionTimer");
}

"What you think is irrelevant" - A character of our time

A Christmas Hunt
(This post was last modified: 07-25-2014, 03:35 PM by i3670.)
07-25-2014, 03:29 PM
Find


Messages In This Thread
Random Looped Sound - by Plazmater - 07-25-2014, 03:20 PM
RE: Random Looped Sound - by i3670 - 07-25-2014, 03:29 PM
RE: Random Looped Sound - by Plazmater - 07-25-2014, 04:16 PM
RE: Random Looped Sound - by Mudbill - 07-25-2014, 05:04 PM
RE: Random Looped Sound - by Plazmater - 07-25-2014, 05:10 PM
RE: Random Looped Sound - by Mudbill - 07-25-2014, 05:13 PM
RE: Random Looped Sound - by Plazmater - 07-25-2014, 05:17 PM
RE: Random Looped Sound - by Mudbill - 07-25-2014, 05:20 PM
RE: Random Looped Sound - by Plazmater - 07-25-2014, 05:23 PM
RE: Random Looped Sound - by i3670 - 07-25-2014, 07:28 PM
RE: Random Looped Sound - by Plazmater - 07-25-2014, 07:57 PM



Users browsing this thread: 1 Guest(s)