Author Topic: (Event) After music loop?  (Read 1863 times)

 Can someone make an event that plays music one time and doesn't loop?

OnActivate self Firerelay
Onrelay Self Playmusic (duration times play)
Onrelay Self Playmusic (duration times play)
Onrelay Self Playmusic (duration times play)
Onrelay self Firerelay

Something like that.
I was thinking of making a radio station if this mod would ever be made or have been made.
So please make a mod like this it would be quite useful.

You can just use the setMusic event...

but  the music will loop?
« Last Edit: June 14, 2015, 11:23:17 AM by A_TEE »

but  the music will loop?

You can set a delay for the default event. All you have to do is time it properly which isn't that difficult to do.

e.g.

          onActivate Self setMusic __Example Music____
60000  onActivate Self setMusic NONE

or what ever you decide, it's not really worth making a whole new event for.

Well the thing is the event delay times only go up to 30000 mil secs
« Last Edit: June 14, 2015, 12:10:59 PM by A_TEE »

« Last Edit: June 14, 2015, 12:03:07 PM by A_TEE »

Well the thing is the event delay times only go up to 30000 mil secs
After 30 seconds, make it fire a relay that with make another event trigger after another 30 seconds.

music playback isn't handled server-side; this can't really be done

your best bet is a delay lasting the length of the music clip, but clients that weren't in range at the start of the loop will just have it cut off in the middle

After 30 seconds, make it fire a relay that with make another event trigger after another 30 seconds.

Or just a simple VCE loop with a switch case.

your best bet is a delay lasting the length of the music clip, but clients that weren't in range at the start of the loop will just have it cut off in the middle

This would be fine, because there is a greater chance that if the players are within the music range long enough to hear the cut off, then they are in range for a longer period of time, and thus would only have to experience the cut-off once, and everything would be fine after that.  Though, it would be good to include a delay period between the end and beginning of each consecutive song, just in case there is any unwanted lag.

Just divide the duration of the loop by 1000, and put it into the delay box for the event that is called when the loop finishes.
Shouldn't be too hard considering most loops are <= 30 seconds.