How to make music loop
- Marine
- Protoss Dragoon Shooting Target
- Posts: 905
- Joined: Sun Aug 27, 2006 8:16 pm
- Location: MICHIGAN
How to make music loop
When you had CC before it was destroyed, I read how to make music loop, but now I dont know how, can anyone help me at doing it?
[img]http://img143.imageshack.us/img143/3600/zergsig5smallff5.png[/img]
-
- Xel'naga World Shaper
- Posts: 146
- Joined: Fri Aug 25, 2006 5:50 pm
- Location: Seattle, WA
Re: How to make music loop
The simplest way is to get Thundergraft and rename the file you want to play to have a .loop extension. That will make it play indefinitely. If you don't want to use Thundergraft, there's a more complex way using triggers. First, find out the exact length of the song. Let's just say that the piece of music is 90 seconds, or 90,000 milliseconds.
The first trigger should be for the player that hears the music.
CONDITIONS:
- "Music Start" is set.
- "Music Loop" is cleared.
ACTIONS:
- Set "Music Loop".
- Play "song.wav".
- Preserve trigger.
The next trigger needs to be for a player that will not be using triggers, because the WAIT command tends to interfere with all triggers that attempt to run while it's active.
CONDITIONS:
- "Music Start" is set.
- "Music Loop" is set.
ACTIONS:
- Clear "Music Start".
- Wait for 90000 milliseconds.
- Clear "Music Loop".
- Set "Music Start".
- Preserve trigger.
That should work out fine.
The first trigger should be for the player that hears the music.
CONDITIONS:
- "Music Start" is set.
- "Music Loop" is cleared.
ACTIONS:
- Set "Music Loop".
- Play "song.wav".
- Preserve trigger.
The next trigger needs to be for a player that will not be using triggers, because the WAIT command tends to interfere with all triggers that attempt to run while it's active.
CONDITIONS:
- "Music Start" is set.
- "Music Loop" is set.
ACTIONS:
- Clear "Music Start".
- Wait for 90000 milliseconds.
- Clear "Music Loop".
- Set "Music Start".
- Preserve trigger.
That should work out fine.
- The Oracle
- Xel'naga Hero
- Posts: 280
- Joined: Sun Nov 19, 2006 9:00 pm
- Location: Imprisoned on Aiur
Re: How to make music loop
You can also chain multiple themes using that. Each theme just needs its own switch, then when the cycle is complete, switch back to the first theme and have them go through the songs again.
2-3 varying themes, particularly on a longer level, is always a nice change of pace for players.
2-3 varying themes, particularly on a longer level, is always a nice change of pace for players.
You haven't lived until you've edited 5,000 recorded .mp3's of dialogue!