Frictional Games Forum (read-only)
Looping a sound on an entity? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Looping a sound on an entity? (/thread-20521.html)



Looping a sound on an entity? - tonitoni1998 - 02-26-2013

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 ^^


RE: Looping a sound on an entity? - OriginalUsername - 02-26-2013

Seriously? Use playsoundatentity..

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

Read that before asking those questions.


RE: Looping a sound on an entity? - tonitoni1998 - 02-27-2013

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.


RE: Looping a sound on an entity? - OriginalUsername - 02-27-2013

(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.


RE: Looping a sound on an entity? - tonitoni1998 - 02-27-2013

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


RE: Looping a sound on an entity? - FlawlessHappiness - 02-27-2013

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