Character Specific Music

CyanGaming

Cyan the Cyan Hedgehog
I'm currently working on a character that will be playable in game, however I'm not sure the current super music will fit, is there a way I can make it only used for that character?
 
Natively, there isn't.

You can make a Lua script that would intercept the instant you become super and use it to change the song being played to the song you want to play.

An example would be:
Code:
addHook("PlayerThink", function(player)
	
	-- If the player JUST became super:
	if player.powers[pw_super] == 1 then
		-- Change the music to lump MUSIC, and set it as looping
		-- (Only do it for the current player)
		S_ChangeMusic("MUSIC", true, player)
	end
end)
Replace MUSIC with the relevant music lump, of course.
 
Last edited:

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top