I build mp3 player, and the problem is, that when I play mp3 in one level, and load another, mp3 keep playing :/. I tried 'event Destroyed' and mutator:
but nothing works. So my question is: how to interact with an actor, when level is about to change?
Code:
class RMp3PlayerStopper extends Mutator;
var RMp3Player JukeBox;
function AddMutator(Mutator M)
{
if ( M.IsA('RMp3PlayerStopper') )
{
return; //only allow one mutator
}
Super.AddMutator(M);
}
function BeginPlay()
{
foreach AllActors(class'RMp3Player', JukeBox)
break;
log("Mp3Player: mutator begins play");
}
function bool HandleEndGame()
{
ShutDownMusicSys();
Super.HandleEndGame();
return False;
}
function ShutDownMusicSys()
{
log("Mp3Player: shuttin gdown");
JukeBox.ShutDown();
JukeBox.Destroy();
}
but nothing works. So my question is: how to interact with an actor, when level is about to change?
Last edited: