Frictional Games Forum (read-only)

Full Version: Level editor sounds tutorial
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey there, I really like you guys's tutorials on the level editor, it's really helped me out a lot. I really liked the video tutorials and the outdoor areas tutorial!

So I'm wondering if someone could do a quick tutorial on the use of sounds? I can't seem to get my sounds right, they're either too low or too high etc. And some tips on making scary sound effects, like someone moaning/screaming for an example. When I do this it just loops the sound and it sounds pretty ridiculous.
And I think a lot of people would find it helpful with sound tutorial(s)
If anyone would make a tutorial on it it would be greatly appreciated!
For your random soundscape, use a simple switch function. In your OnStart() put this:

AddTimer("soundscape_start", RandInt(10,20), "SoundScape");

Add any number of areas around your map and index them, meaning name them soundarea_1, soundarea_2, soundarea_3, etc. Now you create your SoundScape function.

Code:
void SoundScape(string &in asTimer)
{
    switch(RandInt(1,4)) {
        case 1:
            PlaySoundAtEntity("", "soundfile1.snt", "soundarea_"+RandInt(1,10), 0, false);
        break;
        case 2:
            PlaySoundAtEntity("", "soundfile2.snt", "soundarea_"+RandInt(1,10), 0, false);
        break;
        case 3:
            PlaySoundAtEntity("", "soundfile3.snt", "soundarea_"+RandInt(1,10), 0, false);
        break;
        case 4:
            PlaySoundAtEntity("", "soundfile4.snt", "soundarea_"+RandInt(1,10), 0, false);
        break;
    }
    AddTimer("soundscape_reloop", RandInt(10,20), "SoundScape");
}

//change the RandInt(1,10) to however many areas you have. If you have 10 areas make it 1,10; if you have 20 make it 1,20 etc. You can change the frequency of the sounds by altering the timer duration under each case.
Ooooh I see, thank you! Finally I can get them working properly! Smile