[R168] Music playing only when error message shows up

0 favourites
  • 6 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • Hi everyone!

    Problem Description

    I met a special software trick maybe someone will be able to tell me about.

    I have a problem making my music starts in my game. My web navigators (Google Chrome, Mozila Firefox, Internet Explorer) seem to unable the music to load.

    Thus, when I start the debugger, I see that the "Currently playing" is on but doesn't load. Exactly, it's loading between 0.0sec and 0.03sec randomly, and it's restarting at anytime.

    [attachment=1:3g2egj12][/attachment:3g2egj12]

    Attach a Capx

    Not relevant. I tried with the simplest platform game with only one event : "On every tick" -> "Play music". And it's the same thing.

    Description of Capx

    Not relevant.

    Steps to Reproduce Bug

    Not relevant.

    Observed Result

    The weirder is, and here is THE trick, my music starts to play when I get an error message by clicking on "Watch" or "Profile" (what I cannot do because I'm a free licensed user).

    [attachment=0:3g2egj12][/attachment:3g2egj12]

    This happens with Mozilla Firefox and Google Chrome. Internet Explorer never plays the music.

    Expected Result

    So I understand that my music is not the problem but what is ? My navigators? Construct2?

    I expect my music to play as long as my player is in the right zone. I would like the music to change according to the planet my player is on. But the first step is to make the music starts.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES (except that the music never plays)

    Operating System and Service Pack

    Windows 7 - 64bits - Service Pack 1

    Construct 2 Version ID

    Release 168 (64 bits) - Free edition

    Thanks for your help!

    Winsclav

  • Everyone, some quick up-coming.

    My problem is obsolete and my music is playing perfectly if I make my song starts with a trigger.

    Event: Keyboard / On "Espace" pressed -> Audio / Play "music"

    When I will find the way to make my music starts without a trigger, it will be good for me.

    Still, this bug about music starting with an error message still makes me circumspect.

    Hope my bug report is not a total false alert.

    Thank you for your consideration.

    Winsclav

  • "On every tick" runs about 60 times a second. Starting your music there is not what you want - you will only hear the first 1/60 of a second of it. You need to spend a bit more time on the tutorials and manual to understand the events better. You can try "On start of layout" to run music when the layout starts. Otherwise, you need to define better conditions for when to start/stop the music.

  • Thanks blackhornet, I needed a small push, and you did well. I first posted my question on the beginner's section, but it felt weird about the music playing with an error message, and only with it.

    So, "On start of layout" alone is, of course, working. But it's not what I was looking for.

    So, my problem was the trigger, I needed a trigger, so I used that trigger: "System / Trigger once", combined with an "Is overlapping another object", or another event lasting, it works.

    To start and stop the music according to the place my player is, I set a global variable "music". When my player hits the planet, the variable change, then I just need to make the music stop, and then play.

    So I found out how to play music, BUT, this bug about music starting with an error message still makes me circumspect...

  • The error message issue can be explained: the engine stops at that point, so the music plays, since it isn't restarting every 1/60 of a second.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as not a bug.

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