Fangames > Programming Questions
custom death sound for a besific room?
(1/1)
			danielh05:
			
			what i mean with this is how do i make it so that a room has a diffrent death sound then all the other ones, every kind of help would be nice
		
			Lulu49_:
			
			
--- Quote from: danielh05 on February 26, 2018, 02:26:44 PM ---what i mean with this is how do i make it so that a room has a diffrent death sound then all the other ones, every kind of help would be nice
--- End quote ---
Hi, to make this, go to the creation code of your room and put this code :
--- Code:  ---player.deathSound = [Name of the muisic]
--- End code ---
Next go to the player step event and put this code :
--- Code:  ---if player.deathSound == 0
{
     player.deathSound = sndDeath
}
--- End code ---
and finally, go to the script "killPlayer" and in the line 16 remplace "sound_play(sndOnDeath);" and sound_play(sndDeath); by this code :
--- Code:  ---sound_play(player.deathSound);
--- End code ---
I'm French so I'm sorry if I made English errors...
		
Navigation
[0] Message Index
Go to full version