Music Progress Bar
I wasn't sure wether to post this here or in Music but here goes:
I have a game that has many different music tracks that cycle through of varying lengths. I want to show a progress bar for how far through the current song you are. But since they are different lengths, I cannot think of a way to do this. I already know what the length of each one is if that helps. There is probably so crazy complicated math solution, but I just can't think of one. Please help.
Thanks so much
-Thomas
I have a game that has many different music tracks that cycle through of varying lengths. I want to show a progress bar for how far through the current song you are. But since they are different lengths, I cannot think of a way to do this. I already know what the length of each one is if that helps. There is probably so crazy complicated math solution, but I just can't think of one. Please help.
Thanks so much
-Thomas
Comments
Thanks
-Thomas
Thanks TSB, that should work
you're da bomb
-Thomas
Kind of like this:
|-----0------|
So I'm still going to use interpolate, but I'm just going to interpolate the position of my actor over and make it last the correct amount of time.
-THomas
I am still having trouble with this.
The problem is that the interpolation does not stop when the song changes. Instead it continues and does not reset.
Here's what I have:
There is a Game Atribute (MusicProgress) that tells whether or not the song is playing and how long it is.
Inside the slider: Rule: If Game.MusicProgress > 1 ,then Interpolate Self.Position.X to Game.MusicProgress + Self.Position.X for the duration of Game.MusicProgress with the function being Linear. Otherwise, change Self.Position.X to 120
At the end of each song, Game.MusicProgress changes to 0 for 1 second before changing to the next song. For each song Game.MusicProgress changes to the length of that particular song.
Could anyone please help?
-Thomas
-Thomas
-Thomas
Ace
If you want this:
1-----o-----2
And the 'o' is the marker you will just need to set the x value of the marker to that of '1' and interpolate it to the x value of '2' and the duration is what needs to be set to game.songDuration
Ace
Thanks Ace for that. It must have slipped my brain.
However, I'm having another problem. I have an interpolation rule that is controled by a atribute. When the atribute is 1, I want it to interpolate. When the atribute is 0, I want the interpolation to stop. Then, when the atribute goes back to 1, I want it to start again.
Just putting an interpolate withen a rule that says when atribute = 1 is apparently not enough. When I do the the interpolation stops but will not start again. It's almost like I need the rule to keep checking back to make sure everything is as it should be.
Thanks,
Thomas
-Thomas