Frictional Games Forum (read-only)
Looping custom sound? - 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 custom sound? (/thread-22369.html)



Looping custom sound? - Tomzzz - 08-08-2013

I want to loop my custom sound (which is working good) but i have to idea how to make loop script..
this is all i made but game crash , its not looping thro.. sound file is 19 seconds long and i want to make it loop at one area forever... possible?


PHP Code:
void OnStart()
{  
    
PreloadSound("mstdrips.snt");
AddTimer("E1"0"Drops");
AddTimer("E2"19"Drops");
    } 

void Drops(string &in asTimer)
{
    
string x asTimer;
    if (
== "E1")
    {
        
PlaySoundAtEntity("""mstdrips.snt""ScriptArea_7"2false);
    } 
    else if (
== "E2"
    {
        
    
PlaySoundAtEntity("""mstdrips.snt""ScriptArea_7"2false);
    } 


Opssttt Loop was set to false that was the problem.. SOLVED