PDA

View Full Version : How do you make music repeat?


OvermindServent
05-15-2008, 9:19 PM
I would like a certain music to play after the songs finished but whatever I've tried it doesn't work. can someone please tell me how to make this trigger.

atrocity3010
05-15-2008, 9:35 PM
Hyper triggers and death counters are your best friend. Whenever a song needs to be played, set a switch and add deaths (preserved) to an inconsequential unit. I personally recommend chopping the song into 5-second intervals, for which you can check to see if exactly 59 of that unit (magic number for 5 seconds) has been killed. If so, play the next part of the song.

Once you want the song to repeat, set the deaths to 0, and if you want the song to stop, set the deaths to 0 and clear the song switch.

OvermindServent
05-15-2008, 11:15 PM
Thanks, I've almost forgotten how hard map making/trigger making was. Sitting at the computer drinking Iced Coffee and working on maps.

Dem0nS1ayer
05-17-2008, 8:59 AM
You could also find out how many seconds the song is, and then make a trigger saying, "Always; Play wav; Wait (however many seconds your music is x1000) milliseconds; Preserve Trigger."

Durandal
05-17-2008, 10:03 AM
Yeah, but that tends to create enormous wait blocks. Better to just use a simple death count trigger.

Basan
05-17-2008, 11:15 AM
Plus, as Atrocity' & Durandal suggested, it tends to act smoother than the other option. ;)