Legacy GM Slow Down Audio

K

KDG

Guest
How (in GML) would you slow down audio at its current point, up until a certain point.

Scenario:
In my project, when an enemy gets too close to the player, time slows down, I want the music to slow down along with it, and speed back up after the player is a safe enough distance for time to not die, and speed up.
 

Becon

Member
There used to be a function called sound_background_tempo which you could use if it was a midi file. It's now obsolete though. Might need some DLL now to change that sort of thing. =o(
 
A

Ape

Guest
you can achieve it with audio_sound_pitch or emitter pitch

below code cuts the speed to half when mouse key down
Code:
if(mouse_check_button(mb_left)){
    audio_sound_pitch(sound0,0.5);
}else{
    audio_sound_pitch(sound0,1);
}
 
Top