audio playbacktime

Get help using Construct 2

Post » Sat Aug 17, 2013 4:15 pm

Hi,
I have problem and i am not sure if its a bug or if i am doing something wrong.
I am making a game that incorporates my album music in it and i want to show the current playing track time.

So i made a text object to display the current track time like this:

set text to:
int((audio.PlaybackTime(nowPlaying)/60))&":"&int((audio.PlaybackTime(nowPlaying)%60))

nowPlaying is a global number var that i set according to the current playing track.

if i play track1, i use "1" as a tag and update this var to 1.

my problem is when i press on stuff in the game that plays audio(with a different tag) while a music track is still playing and i do not update or change nowPlaying (still set on 1) in that event, the text box shows me the time of the 2nd audio that is playing, instead of continue showing the playbacktime of track1.

anyone got any ideas?Lof2013-08-17 16:17:13
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713

Post » Sat Aug 17, 2013 5:01 pm

nevermind guys, i fixed it, in case you wonder i changed it to (""&nowPlaying)
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests