How do I make a sprite appear in conjunction with music

0 favourites
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • Just wondering, does the song file have to be in AAC format in order for it to work during runtime?

    I tried M4A, and OGG and nothing else seemed to work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The audio.playbacktime("music") doesn't seem to work no matter what I do. I did everything correctly, the tags, everything.

  • You probably need to use round(audio.playbacktime("music")) for it might not ever be exactly the amount you're aiming for..

    If you need smaller amounts of time multiplying before rounding might work..

  • Thanks so much!

    It works perfectly!

  • Just checking, what does the "round" function do? I checked the manual, and I dont clearly understand why it made this function work. And also for future reference, what do you mean by mulitply before you round? I may need to make intervals shorter. How would multiplying help?

    Sorry for bothering you so much,


  • round just rounds the figure

    1.8 = 2

    1.5 = 2

    1.4 = 1

    3.25 = 3


    with multiplying I mean

    round(3.25487) = 3


    round(10*3.25487)/10= 3.3

    this way you can work with decimals..

    without using this there is no way to be sure the exact number you chose will be reached, for even with 0.0000001 difference the computer will not accept it

    5.00000001 is not the same as 5 rounding the number will make it so..

    there's also floor() always rounding down and ceil() always rounding up..

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