(08-29-2011, 06:41 PM)ZRPT Wrote: When I try to play a sound it keeps repeating, how can I prevent this?
Here is the line I use PlaySoundAtEntity("", "21_alex_low_freq_rumble.snt", "doorunlock", 0, false);
No matter what I do, the sound just keeps repeating itself.
Let's say in this function called "Func01()", there is this command function, then we'll have the sound stop 3 seconds after. If you want to, you can change it to make it stop whenever you think it sounds right to be stopped at. To make it work, just create a timer in the function where the sound is and have it be stopped like how I'll do it in this example.
void Func01()
{
PlaySoundAtEntity("Sound01", "21_alex_low_freq_rumble.snt", "doorunlock", 0, false);
AddTimer("", 3, "Func02");
}
void Func02(string &in asTimer)
{
StopSound("Sound01", 2);
}
If you notice, the local name of the sound is used to stop it. Hope this helps!

(08-29-2011, 07:31 PM)MegaScience Wrote: I created an incredibly simple map just to begin testing, saved it into a Custom Story folder, and tried to open it through Development mode. Got a Fatal Error. I'm sure it has to do with where I saved it and such, but I wouldn't understand without example.
So what does it say to be a fatal error?
Perhaps you can show me you script.