AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   EmitSound simple questions...Quick answers? (https://forums.alliedmods.net/showthread.php?t=68923)

kirewv 03-24-2008 19:35

EmitSound simple questions...Quick answers?
 
When using the EmitSound functions do they loop by default?

If not how would I make them loop and stop the loop?

And what does the flag SND_STOPLOOPING do in these functions(there is no SND_STARTLOOPING flag)?

kirewv 03-25-2008 12:03

Re: EmitSound simple questions...Quick answers?
 
Surely, someone must know an answer? :(

L. Duke 03-25-2008 13:53

Re: EmitSound simple questions...Quick answers?
 
The sound file must have a cue in it that says to loop. If you're using default game sounds you must choose either a looping or non-looping sound file. If you're using a custom sound, you'll need to add a cue to the wav file.

From editlife.net
Quote:

If you want the sound to loop, and it's a WAV, you will need to add a cue point to the file. In GoldWave, under the Tool menu, there is a Cue Points feature with which you can create a New... cue point At Start (most positions should work, but the start is convenient) with any name you like. Save the WAV with the cue point and uncheck the ambient_generic's Is NOT Looped flag. You will find that the sound now loops infinitely in-game.

kirewv 03-25-2008 14:37

Re: EmitSound simple questions...Quick answers?
 
Ok, but this has nothing to do with sourcemod stock functions.

I am guessing you are saying they do not loop by default?

Still want to know what the flag SND_STOPLOOPING does?

and I suppose I could use a timer to loop them?

KMFrog 03-25-2008 16:05

Re: EmitSound simple questions...Quick answers?
 
The sound file itself says if it should loop or not.

Using a timer would suck at looping sounds as every player has different latency when receiving the sound command... it probably would only be good enough for LAN servers.

The best way is to simply put a cue in the sound file to make it loop (as has been suggested above)


All times are GMT -4. The time now is 13:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.