I Wanna Community

custom death sound for a besific room?

0 Members and 1 Guest are viewing this topic.

Offline danielh05

  • 5
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 64.0.3282.167 Chrome 64.0.3282.167
  • 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

Offline Lulu49_

  • 2
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 58.0.3029.110 Chrome 58.0.3029.110
  • 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...