How do I make an audio progress bar?

0 favourites
  • 4 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • Hello! I'm following a guide based on this old thread but for some reason the expression keeps on returning NaN. It seems like there's a 1/2 sec on start of layout where the value is NaN so that is messing with the multiplier. Thank you for all the help!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If Audio_Progress_Fill is a sprite, use Audio_Progress_Fill.ImageWidth expression (not Width). If it's a Tiled Background object, use a fixed number, like 100.

  • in the first event you are waiting 1 second before starting the audio playback

    but in event 3 (every tick) you are calculating a width for the bar based on the audio tag that hasn't started yet. the entire eventsheet is executed every tick (about 60 times a second), so it will try to set the width and fail until the sound is finally started.

    instead of "every tick" you may want to use "is 'player' playing" - (then calculate width)

    is there a reason you are waiting a second before starting the sound?

  • in the first event you are waiting 1 second before starting the audio playback

    but in event 3 (every tick) you are calculating a width for the bar based on the audio tag that hasn't started yet. the entire eventsheet is executed every tick (about 60 times a second), so it will try to set the width and fail until the sound is finally started.

    instead of "every tick" you may want to use "is 'player' playing" - (then calculate width)

    is there a reason you are waiting a second before starting the sound?

    Changing "every tick" along with Dop2000's recommendation worked. Thank you both! It's an instructional audio in a new map so I wanted players to be aware what's going on, hence the "wait 1 sec"

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)