0 Favourites

Control Volume

  • Hello,

    I have a huge difficult to figure out how implement a Volume System.

    My research pointed for this:

    <img src="https://dl.dropbox.com/u/47035927/temp/sound.png" border="0" />

    But |>sound ""| is suppose to edit the sound volume of the last sound, right? and how I can setup the volume for the entire project?

    This code is working fine, but it don't update the volume while it's playing, I need to re-play it to update the volume =\

  • Have you included it in the other event sheets?

  • For sure lonehangman, you can test it alive to see how it's not updating the currently running sounds, only new triggered sounds update the volume =

    http://goo.gl/TCWPp

    I'll rework the entire sound system to make it simpler, because it's becoming a headache ~~

    After deleting the Stop tag, still the same result.

    But thanks anyway.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hi TELLES0808 :-)

    I can't help you with your sound problem.. But I just want to tell you that the game is great, fun to play, some nice effects and cool art - Good job! :-)

  • Is there a reason why you put them all as a sub event for "every tick" ?

    And you can put "System: Set "" volume to master_volume db" to every tick event. There is no point to duplicate that event.

  • Is there a reason why you put them all as a sub event for "every tick" ?

    And you can put "System: Set "" volume to master_volume db" to every tick event. There is no point to duplicate that event.

    No reason shinkan, I just like to update the code every tick. But the code as main events give the same result.

    There are different frames, which one represent +, -, etc, that's not duplicated or double checking events, the set there is to set the "Volume" text percentage on the screen.

    Frame 0: +

    Frame 1: -

    Frame 2: Sound activated

    Frame 3: Sound deactivated

  • here are different frames, which one represent +, -, etc

    It doesn't matter. "master_volume" is a global variable so "System: Set "" volume to master_volume db" refers to global variable.

    Every tick -> System: Set "" volume to master_volume db

    means

    if you set master_volume do 1 then volume will always be 1

    if you set master_volume do 5 then volume will always be 5

    You only need to specify when to add or subtract values from that variable.

    It's like for example opacity for a sprite

    gv "spr_op = 50"

    button up -> add 20 to spr_op

              -> set sprite.opacity to spr_op

    button down -> subtract 20 from spr_op

              -> set sprite.opacity to spr_op

    this is equal to

    gv "spr_op = 50"

    every tick -> set sprite.opacity to spr_op

    button up -> add 20 to spr_op

    button down -> subtract 20 from spr_op

  • here are different frames, which one represent +, -, etc

    It doesn't matter. "master_volume" is a global variable so "System: Set "" volume to master_volume db" refers to global variable.

    Every tick -> System: Set "" volume to master_volume db

    means

    if you set master_volume do 1 then volume will always be 1

    if you set master_volume do 5 then volume will always be 5

    You only need to specify when to add or subtract values from that variable.

    It's like for example opacity for a sprite

    gv "spr_op = 50"

    button up -> add 20 to spr_op

              -> set sprite.opacity to spr_op

    button down -> subtract 20 from spr_op

              -> set sprite.opacity to spr_op

    this is equal to

    gv "spr_op = 50"

    every tick -> set sprite.opacity to spr_op

    button up -> add 20 to spr_op

    button down -> subtract 20 from spr_op

    Oh, you're talking about the trigger method. It's vestige of a bug already solved by Ashley on R104 (click here), but I didn't changed the code because I recently updated to the R104.

    But changing it have no effect on the sound volume of playing sounds in this project, so I'll start again from scratch and search for any mistake I did on the code, also, organize the triggers again, because that bug did a lot of troubles with double checking, as I said here: http://www.scirra.com/forum/forum_posts.asp?TID=56907&PID=356424&title=pick-in-subevent-bug#356424

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