Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sounds Loop
Author Message
Alroc Offline
Junior Member

Posts: 24
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Alroc Offline
Junior Member

Posts: 24
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 4,095
Joined: Apr 2006
Reputation: 202
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Alroc Offline
Junior Member

Posts: 24
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
trancedj Offline
Member

Posts: 60
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)