Yeah but that's a bit advanced
But I'll explain :3
First, you have to find out exactly how long the audio file is. Then you have to figure what your frame rate is, (Config - Game Options)
Now make a variable to be used as a timer, because the timer function would be innacurate since I dont know how to correctly use it
Anyways, make a variable called timer. Now, as you see in the screenshot, it's 30, right? every 30 frames is 1 second, so in the draw actor of the view, use this code:
- Code: Select all
timer++;
So now, take however many seconds are in the song, and multiply it by the frame rate. For example, a 2:45 second audio file would be 4950 frames if your FPS is 30. If it's anything higher you have to multiply the secodns by the frame rate you have.
Now use an if statement to change the song
Do the same thing for the next song
Before you continue though, make another variable to determan which song your on. Name it song
- Code: Select all
if (timer == 4950 && song == 0)
{
play second song :D
timer = 0;
song = 1;
}
if (timer == second song length && song == 1)
{
play first song :D
timer = 0;
song = 0;
}
Hope this helped
If it's too confusing I could break it down more