Author Topic: custom death sound for a besific room?  (Read 697 times)

danielh05

  • Wannabe
  • Posts: 5
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 64.0.3282.167 Chrome 64.0.3282.167
    • View Profile
  • Playstyle: Keyboard
custom death sound for a besific room?
« 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

Lulu49_

  • Wannabe
  • Posts: 2
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 58.0.3029.110 Chrome 58.0.3029.110
    • View Profile
  • Playstyle: Keyboard
Re: custom death sound for a besific room?
« Reply #1 on: April 28, 2018, 12:40:08 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

Hi, to make this, go to the creation code of your room and put this code :

Code: [Select]
player.deathSound = [Name of the muisic]

Next go to the player step event and put this code :

Code: [Select]
if player.deathSound == 0
{
     player.deathSound = sndDeath
}

and finally, go to the script "killPlayer" and in the line 16 remplace "sound_play(sndOnDeath);" and sound_play(sndDeath); by this code :

Code: [Select]
sound_play(player.deathSound);

I'm French so I'm sorry if I made English errors...