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
Plazmater Offline
Member

Posts: 122
Threads: 24
Joined: Aug 2013
Reputation: 1
#3
RE: Random Looped Sound

"int iArea = RandFloat(1, 7); <--- if you want the sound to be played at different areas: insert the number of areas."

I cant quite understand that , if i would set it (1, 3) , so it would play sound at original area and 2 others. But at which 2 other areas ? Should I create them and SOMEHOW script it as another areas for the same sound. Or it would randomly found 2 more areas that exist on the map and play it there ?

void FunctionTimer(string &in asTimer)
{
int iArea = RandFloat(1, 3);
float fTime = RandFloat(5f,7f);

PlaySoundAtEntity("afx_spooky_mansion_whisper"+iArea , "afx_spooky_mansion_whisper.snt", "ScriptArea_1"+iArea , 0.0f, false);

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

I keep getting error:

FATAL ERROR: Could not load script file 'MyFC/maps/Level1.hps'!
main (15, 26) : ERR : Expected ')' or ','
(This post was last modified: 07-25-2014, 04:54 PM by Plazmater.)
07-25-2014, 04:16 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: 2 Guest(s)