ID:152131
 
Well I was wondering.

Lets say I have background music running in my game.
Now someone starts a dialog.

I want the background music to be muted for a while, set the volume to 0.
Once the dialog has ended I want to turn back the volume of the background music.

Now I would I beable to see if a sound is playing or not?
Or how would I beable to determine the lenght of the dialog sound file?

Is there any way to do this?
Maybe I should request this feature, I looked arround and can't find a way to determine how long a song takes or when it's finished playing.

[edit]
Some tests I did.
Check mid file lenght, but this in no way corresponds with the actual lenght in time, woa surprice, was worth a try.
Also tried to use file2text but this shows a 4 character string, also surprice!

I had 2 files setup like
var/sound/a = sound(file,0,0,1)
var/sound/b = sound(file,0,1,1) //waits
src << a
src << b


Now I checked their vars at the time 1 stops playing and the other kicks in.
There is no change in either one of them
All vars stay the same for a and b before and after the switch.

Then I went check, just to be sure, if there is a var somewere for mobs or clients which contains sounds datums when they are played, but there is no such thing.
Well there probably is something like this but it's not build in the DM language for us to see and use.