• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Sounds need to play

J

JDSTIGER

Guest
So on this code it plays a sound once the object reaches an area, but it won't play. I also have one that it plays a sound on death but it also didnt play.
Code:
if (state = 1) {
    var fallplus = 0.25;   
    fallspeed += fallplus; 
    
    if (rotation > 270) {
    rotation -= fallspeed;

    sound_play (snd_point)
    
    } else {
        rotation = 270;     
        state = 2;         
    }
}
 
R

Ryzzax

Guest
hmm... well, not sure if this will solve the issue, but I never used 'sound_play(index)' before, the one I always use is 'audio_play_sound(index, priority, loop); and it works great.
Try that, if it doesn't work, well I don't really know tbh x)
 
B

Blackened

Guest
sound_play is a legacy sound function which is provided for compatibility with previous versions of GameMaker and are also still in use when dealing with HTML5 and JS games. Legacy sound functions need to be switched on through the setting in the Global Game Settings: General Tab as the default setting. Try using audio_play_sound(index, priority, loop); as that is of the newer default gms audio engine.
 
J

JDSTIGER

Guest
hmm... well, not sure if this will solve the issue, but I never used 'sound_play(index)' before, the one I always use is 'audio_play_sound(index, priority, loop); and it works great.
Try that, if it doesn't work, well I don't really know tbh x)
sound_play is a legacy sound function which is provided for compatibility with previous versions of GameMaker and are also still in use when dealing with HTML5 and JS games. Legacy sound functions need to be switched on through the setting in the Global Game Settings: General Tab as the default setting. Try using audio_play_sound(index, priority, loop); as that is of the newer default gms audio engine.
It worked thanks!
 
Top