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
Stop a looping sound
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#4
RE: Stop a looping sound

You need to use a timerloop such as this:

void BeginCreak(string &in asTimer)
{

   int iCreak = RandFloat(1, 4);
   float fCreak = RandFloat(5.5f, 12.5f);
  
   PlaySoundAtEntity("creak1"+iCreak, "scare_wood_creak_mix.snt", "AreaCreak_"+iCreak, 0.0f, false);
  
   AddTimer("creak", 15.0f+fCreak, "BeginCreak");
  
   AddDebugMessage("Now Creaking in AreaCreak_: "+iCreak, false);
  
}

This will randomize when the sound plays and it's location, assuming you have setup several script areas(1 to 4) named "AreaCreak_#".
09-30-2010, 12:52 PM
Find


Messages In This Thread
Stop a looping sound - by Jordo76 - 09-29-2010, 05:28 PM
RE: Stop a looping sound - by Equil - 09-30-2010, 03:55 AM
RE: Stop a looping sound - by Jordo76 - 09-30-2010, 11:58 AM
RE: Stop a looping sound - by Equil - 09-30-2010, 12:52 PM
RE: Stop a looping sound - by Jordo76 - 09-30-2010, 05:16 PM
RE: Stop a looping sound - by Pandemoneus - 09-30-2010, 08:31 PM
RE: Stop a looping sound - by Jordo76 - 09-30-2010, 08:38 PM
RE: Stop a looping sound - by Pandemoneus - 09-30-2010, 08:50 PM
RE: Stop a looping sound - by Equil - 10-01-2010, 11:20 AM
RE: Stop a looping sound - by Jordo76 - 10-01-2010, 11:53 AM



Users browsing this thread: 1 Guest(s)