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
Sounds Loop
Alroc Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2010
Reputation: 0
#1
Sounds Loop

Hi I'm trying to put some sound loop like steps in a corridor but I don't know how to do it ... Sad

Someone have an Idea ?

Test My Map almost done : http://www.megaupload.com/?d=XLICAH62
09-20-2010, 01:58 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#2
RE: Sounds Loop

PlaySoundAtEntity("Footsteps", "FileName.snt", "EntityToPlayAt", FadeTime, true);

It is important that you set the boolean to true (it's abSaveSound) to make it loop.
If you want to stop it, use

StopSound("Footsteps", FadeTime);

09-20-2010, 02:02 PM
Find
Alroc Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2010
Reputation: 0
#3
RE: Sounds Loop

Not working for me >.< :

void CollideSoundScare1 (string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("ScareSound","scare_male_terrified.snt","Player",0,true);
}

Here is my Code

Test My Map almost done : http://www.megaupload.com/?d=XLICAH62
09-20-2010, 04:17 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#4
RE: Sounds Loop

Ah, well, that one doesn't seem to be a looping sound. I just found out that you can't make sounds loop if they are not defined as looping sounds.

You will have to copy the scare_male_terrified.* files to your custom_stories folder and edit the scare_male_terrified.snt file with a normal text editor. There is a proptery called Loop="False" inside, you will have to change it to True.
But by doing this you will probably have to play your map choosing Custom Stories in the main menu of the game or it will use the standard one.

Maybe one of the developers will be able to bring more light into this topic.

09-20-2010, 04:37 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#5
RE: Sounds Loop

Yes to make a looping sound you have to edit the .snt file (it is a normal text file, or a xml file to be precise). Name it to something different when you have edited it, like mysound_scream_loop.snt
There are also settings in the snt file to control if there should be some quite time between each loop (default is 0, which is none) and if it should be random (default is 1, which is always playing, set this to 0.5 for example to get some random chance of the sound playing).

For better control of a looping sound, I usually do not loop in the snt, I use a regular single sound and then I use a timer in script to play the sound as many times as I like it to play, or for as long as the player is within a certain area. This usually works better and gives greater control.

The true/false in PlaySoundEntity is not about looping, it is to specify if the sound should be saved, most of the time you want this to be false as you do not want to save sounds. But things like a fireburning should be saved, so that the sound is played after the fire started burning.
09-20-2010, 04:52 PM
Website Find
Alroc Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2010
Reputation: 0
#6
RE: Sounds Loop

Thanks I'll try it Smile

Test My Map almost done : http://www.megaupload.com/?d=XLICAH62
09-20-2010, 06:23 PM
Find
trancedj Offline
Member

Posts: 60
Threads: 7
Joined: Sep 2010
Reputation: 0
#7
Help about sound

Hi everyone
I put the sound entity of the rain to be heard on a part of map, but unfortunately when I run my map, the sound of my entity sound is heard in the whole map!!
I changed the max and min distance but never change.
Can someone help me??
09-25-2010, 01:05 AM
Find




Users browsing this thread: 4 Guest(s)