OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: PoZ on 04 May 2003, 12:37:44

Title: Looping Sounds
Post by: PoZ on 04 May 2003, 12:37:44
I need a little help. I have a mission with my own sounds and music, but is there any way I can loop the sounds?? Plz help :)
Title: Re:Looping Sounds
Post by: Wildebeest on 04 May 2003, 12:47:45
The only way I know how to loop a sound is by using a script.  Have the script play the sound, then delay for a length of time equal to the length of your sound effect, then have the script loop back and play the sound again.
 
Below is a copy of one of my scripts, generalized for your purposes, that should accomplish what you want.
 
#loop  
 
; Play the appropriate sound effect.
 
playSound "MySound"
 
; Delay for approximately the length of the sound.
 
~5 ; Change this to the length of your sound effect
 
goto "loop"

Hope that helps
Title: Re:Looping Sounds
Post by: PoZ on 04 May 2003, 12:49:51
Thx!
Title: Re:Looping Sounds
Post by: Wildebeest on 04 May 2003, 13:05:29
np mate :)