I previously posted this on the python form but this is where it should be.
!!!Works with .mp3 and .ogg !!!
Ok, I’ve got a script, or several scripts that will do it. The catch is that you need pygame and to have pygame you will need to have python. This all has to be installed with the correct set path options and there has the be an extra one to point to the pygame directory. That is the hard part. The scripts themselves are quite simple.
(Let me explain a little more about the last paragraph. Python is only need since pygame required it to install. Pygame is really all you need. If you don’t want to install everything I think that only about two files are needed. (The SDL DLL and The libary of cource.) You should be able to drop these files into your working folder with your game.)
To use them just type them out in the text window and set the controller to python and set the script.
#To load music
import pygame.mixer
pygame.mixer.init()
pygame.mixer.music.load(“Your music here.ogg”)
#To play music
import pygame.mixer
pygame.mixer.music.play()
#To stop it
import pygame.mixer
pygame.mixer.music.stop()
#To pause it
import pygame.mixer
pygame.mixer.music.pause() #To unpause change just add un to pause
#To fade out
import pygame.mixer
pygame.mixer.music.fadeout(Time in milliseconds)
#Volume up
import pygame.mixer
from pygame.mixer import *
vol = music.get_volume()
vol = vol + 1 #Subtract to decrease volume
music.set_volume(vol)
There you have it. I will send anyone the sample file if you e-mail me. Hopefully I will soon have a web site I can post this stuff on. asdf_46