• 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!

How to do something every x seconds based on audio's track position

CKlidify

Member
I'm trying to make a rhythm game and right now I have an alarm that triggers every 0.43 seconds to go along with the song but that can go out of sync after a while and there are parts in the game where the music will slow down or speed up respectively and everything will go out of sync.

I was wondering if I could just make the code run every 0.43 seconds based on the track position of the audio that's playing. If someone could help me figure this out it would be greatly appreciated!
 
S

Storyteller

Guest
audio_sound_get_track_position
might help. you could test that each step and check where it is,
then use audio_sound_get_pitch or get_gain to check for your beats? Id almost say you need a map file to the track to align beats you need to hit to beats in the song.
 
Top