Frictional Games Forum (read-only)

Full Version: Looping a sound on an entity?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i tried this:
Code:
void OnEnter()
{
SoundPlay();
}

void SoundPlay()
{
void PlaySound2(string &in timer_name)
{
    SetEntityActive("sound_1", true);
    SetEntityActive("sound_2", false);
    AddTimer("", 2, "PlaySound3");
}

void PlaySound3(string &in timer_name)
{
    SetEntityActive("sound_2", true);
    SetEntityActive("sound_1", false);
    AddTimer("", 2, "PlaySound2");
}
}

but it doesn´t work :/ is there another way to loop a sound on an entity? or do you know why this doesnt work?

thanks ^^
Seriously? Use playsoundatentity..

http://wiki.frictionalgames.com/hpl2/amn..._functions

Read that before asking those questions.
read my post before you complain. i want to loop a sound. PlaySoundAtEntity just plays it once. if there is a way to loop that, tell me.
(02-27-2013, 05:14 PM)tonitoni1998 Wrote: [ -> ]read my post before you complain. i want to loop a sound. PlaySoundAtEntity just plays it once. if there is a way to loop that, tell me.

Open the .snt file in notepad++ or w/e program you use. Then change loop from false, to true.
i tried that in the first place, but it didnt work.

EDIT:

ah now i got what you mean. i first thought you mean the bool abSaveSound. now it works Tongue

thanks
When you edit this file, it won't loop in other CSs unless you include it in the final release