

If you set the track position for the sound_index, any time that sound resource is played in the future, it will start from that position. You can’t just set the position for the sound_index you have to set it for the specific handle of the currently playing instance of the sound. This is necessary to use to set the track position of the playing sound. This was when I discovered that audio_play_sound() returns a handle for identifying the specific instance of the sound that is playing. So to do that, set up a variable to track whether the switch has happened already, and check it, too, even if the condition that triggers the changeover continues to remain true on successive steps. The only real complication is that if you’re checking the condition repeatedly, as you normally would every Step, you only want to trigger the changeover once. This is easy enough, the trickiest part is probably getting the condition right to switch tracks, but depending on the game, that condition could be very simple, too. Here’s how I implemented a speedup for my GMLTetris project:įirst, I created two music tracks, one at normal speed, and one at double speed, and added them to the game project as sound assets. But it’s not as simple as that in GameMaker, as I found out recently. Something like audio_sound_set_speed(sound, speed) would be lovely. It’d be great if you could simply set a new tempo with a simple GML function, and have the current background music adjust on the fly. In so many games, music speedup is a great way to get the message to the player that they need to hurry up and get things done. Why arguing about Link’s gender is dumb, and why it’s important.“Null Room” hidden in Superman (Atari, 1979).video games, programming, the internet, and stuff
