How to have BG Music to Continuously play through the main menu section and toggle the BGM?

0 favourites
  • 2 posts
From the Asset Store
In this template the music plays without looping in your game
  • Hello

    I am having issues with Sound in my game here are the following issue I have been having below:

    1. the Background music for the Start and Main Menu does not continuously play through each other because I don't want the back ground menu restarting itself while the player is navigating through the main menu. But this is not that important its just annoying to deal with of course

    2. but this is the main problem I am having is when I am toggling on and off the background music for the game for some reason for music is not immediately playing I have to which between layouts in order for the music to start playing again

    Does anyone have any suggestion on how to fix mainly the 2nd problem but I am open on figuring out problem number 1 as well

    Here is a video showing my problem

    screencast.com/t/nmAtMrmu

    copy of the code for the sound

    screencast.com/t/4UJHAYvscWus

    copy of the sound button that toggles the sound on and off code

    screencast.com/t/qBWUymaWczV

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    I don't have an answer, but if you know a bit of javascript I would recommend add a console.log state in all actions like.

    If you don't know javascript this is what you do.

    Add a script action in your event sheet and write:

    console.log("inside yada yada");

    then you can open your browser dev tools and see in which cases the statements gets printed, then it is quite easy to find where the problem is.

    You can print varable as well like this:

    console.log("hello from javascript", localVars.myVariable);

    Hope you find the problem. Also the Construct build in debugger is very good as well to give you an overview of variable values.

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