Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lulu49_

Pages: [1]
1
Programming Questions / Re: custom death sound for a besific room?
« 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...

2
Programming Questions / Re: "clamp" code not working?
« on: April 28, 2018, 12:28:02 PM »

this is so strange to me because this code was working, but whenever i moved to a new pc it suddenly stopped working. any ideas for help?
EDIT: since no one is responding, can someone just give me code to replace clamp?

If you have gamemaker 8.1 or gamemaker 8.0, the "clamp" code does not work... but you can still make a code to replace it, here is the code :

Code: [Select]
min = 0 //remplace 0 by the minimum value
max = 10 //remplace 10 by te maximum value
val = speed //remplace speed by the value you want to clamp

if val < min
{
      val = min
}

if val > max
{
      val = max
}

Pages: [1]