Sapheros
Member
Attempted to make invincibility music loop...
As said in the topic, I tried to make a script where the music would loop as long as the player is invincible (which includes when the game freezes due to our oh-so-wonderful netcode). Sadly It didn't seem to work with the custom music we made for it, which was in the .ogg format. This was meant to be a workaround to emulate the hardcoding from SRB2Riders and SRB2Kart had with looping music, most especially invincibility themes to save space.
Not sure what went wrong here...
As said in the topic, I tried to make a script where the music would loop as long as the player is invincible (which includes when the game freezes due to our oh-so-wonderful netcode). Sadly It didn't seem to work with the custom music we made for it, which was in the .ogg format. This was meant to be a workaround to emulate the hardcoding from SRB2Riders and SRB2Kart had with looping music, most especially invincibility themes to save space.
Code:
function A_Invincibility(actor, var1, var2)
super(actor, var1, var2)
if (actor.target) and (actor.target.valid) //Make sure the player mobj wasn't destroyed somehow
and (actor.target.player) and (actor.target.player.valid) //Make sure the player data is accessible from the mobj
S_ChangeMusic(1039, true, actor.target.player)
else
if mariomode == true
S_ChangeMusic(1041, true, actor.target.player)
end
end
Not sure what went wrong here...