HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Music plays then cuts out ;/

12-11-2007, 12:11 AM#1
botanic
I have a looping sound in my map however it starts to cut out twords the end and then just stops... its a 36 second mp3 and works just fine by itself or in the wc3 sound manager ;/

Trigger:
Music Start
Collapse Events
Map initialization
Time - Music expires
Conditions
Collapse Actions
Custom script: set udg_MusicDuration=(VexorianMusicList()-2.00)
Countdown Timer - Start Music as a One-shot timer that will expire in MusicDuration seconds

Collapse JASS:
function VexorianMusicList takes nothing returns real
local string array music
local string list
local integer a=0
local integer b
local real duration=0.00
local integer max=43
    call ClearMapMusicBJ(  )
loop
exitwhen a>=40
set a=a+1
    set music[a] = "music.mp3"
endloop
set a = 0
    loop
        exitwhen a>=4
        set a=a+1
        set b=GetRandomInt(0, max)
        set duration=duration+GetSoundFileDurationBJ(music[b])
        if a==1 then
            set list=music[b]
        else
            set list=list+";"+music[b]
        endif
        if not (b==max) then
            set music[b]=music[max]
        endif
        set max=max-1
    endloop
    call SetMapMusicRandomBJ( list )
    return(duration)
endfunction
Attached Files
File type: w3xPhobia.w3x (618.1 KB)
12-19-2007, 09:22 AM#2
botanic
um... anyone... Bueler?