Looping sounds |
Looping sounds |
Nov 26 2010, 22:46
Post
#1
|
|
Senior Member Group: Members Posts: 312 Joined: 18-April 07 From: Birmingham, England Member No.: 767 |
Hi all, I have background music in one of my missions and it works fine but I cannot figure out how to loop the music so it plays throughout the whole mission instead of just playing once. The script i am using is:
"class CfgSounds { // List of sounds (.ogg files without the .ogg extension) sounds[] = {song}; // Definition for each sound class song { name = "Song"; // Name for mission editor sound[] = {\sound\Song.ogg, 1, 1.0}; titles[] = { }; }; };" What do I need to add to this to make it loop? Thanks in advance! -------------------- "Our business in the field of fight, is not to question, but to prove our might." Alexander Pope
|
|
|
Nov 26 2010, 23:40
Post
#2
|
|
Gee, I wish we had one of them doomsday machines. Group: Moderators Posts: 2,037 Joined: 13-November 06 From: Wales Member No.: 155 |
Use a script?
CODE While {true} do
{ Playmusic "MDU_WeightOfResponsibility"; //Replace with the name of your song sleep 134; //Replace with the length of your song in seconds }; -------------------- The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you Site Issues Thread - Complain about site issues here. We might even fix them! Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly". QUOTE(Major Mike Shearer) We can categorically state that we have not released man-eating badgers into the area. QUOTE(Brace Belden) A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one. |
|
|
Nov 27 2010, 11:07
Post
#3
|
|
Senior Member Group: Members Posts: 312 Joined: 18-April 07 From: Birmingham, England Member No.: 767 |
Thanks for the help dave, where do I put this in my script?
-------------------- "Our business in the field of fight, is not to question, but to prove our might." Alexander Pope
|
|
|
Nov 27 2010, 13:26
Post
#4
|
|
Gee, I wish we had one of them doomsday machines. Group: Moderators Posts: 2,037 Joined: 13-November 06 From: Wales Member No.: 155 |
That is the script, in it's entirety
Save it in your mission folder as something like "MusicLoop.sqf". You can call it like this, to start playing the music: CODE MusicLoop = [] ExecVM ""MusicLoop.sqf""; And stop playing the music like this: CODE Terminate Musiczone Note that this terminates the script, not the music itself, so the music will continue playing until it reaches the end of the track. -------------------- The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you Site Issues Thread - Complain about site issues here. We might even fix them! Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly". QUOTE(Major Mike Shearer) We can categorically state that we have not released man-eating badgers into the area. QUOTE(Brace Belden) A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one. |
|
|
Nov 27 2010, 15:40
Post
#5
|
|
Senior Member Group: Members Posts: 312 Joined: 18-April 07 From: Birmingham, England Member No.: 767 |
Works a dream thankyou for your help everybody, much appreciated!
-------------------- "Our business in the field of fight, is not to question, but to prove our might." Alexander Pope
|
|
|
Lo-Fi Version | Time is now: 11th May 2024 - 12:37 |