Quote:
Originally Posted by ffcmike
It sounds as if playlooped() is being invoked from a level NPC rather than a weapon?
|
I am invoking it from a weapon npc actually, not a level npc. As well as invoking stopmusic() from a weapon npc too. The script I'm using is
PHP Code:
//#CLIENTSIDE
function onPlayerEnters() {
temp.song = getmusicfilename(); // current song playing
if ( player.level == "desert2.nw" ) temp.song = "stef49.mp3";
if ( player.level == "level2.nw" ) temp.song = "npulse_svrvilla.mp3";
// only play song if not already playing
if ( getmusicfilename() != temp.song) {
stopmusic();
playlooped(temp.song);
}
}