Audio tag Wildcard question

0 favourites
  • 5 posts
From the Asset Store
100+ Musical High Quality Sound Effects for your game!
  • How does one get around shutting off a looped sound when channeling all sounds into 1 tag?

    i.e.

    Start of Layout

    Compress Audio "sfx"

    Set Volume of "sfx" to user defined

    Then in-game

    Player plays engine_loop > tag "sfx"

    NPC plays engine_loop > tag "sfx"

    how do I stop the player's engine sound only without turning all sounds off?

    Is there anyway to use wildcards with tags? so I can add

    Tag = "sfx" & UID

    and then be able to set global volume with

    "sfx*"

    and then turn a specific sound off with

    "sfx" & UID

    is this possible?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "sfx" & UID

    Yes this works. And there is an action to specifically adjust the global/master volume.

    But I think you want to have like two or more volumes like sfx & music that you can ajust individually. So I think having two variables to store the volumes and using them in the audio play action should work.

  • WackyToaster I want more than just volume controls. I have player sound effects and npc sound effects. Sometimes they use the same sound effect for example when the enemy gets the laserbeam and the player also has that weapon. When both are shooting I want to compress them (audio compression) so they don't add together to make the sfx really loud. Because sometimes there could be 5 npc using the same sfx.

    So I want:

    npc1 loop_sound1 > tag:"weapon_sounds"
    npc2 loop_sound1 > tag:"weapon_sounds"
    npc3 loop_sound1 > tag:"weapon_sounds"
    player loop_sound1 > tag:"weapon_sounds"
    

    Then I want to put a compressor Effect on tag:"weapon_sounds" (which I do in OnStart of Layout)

    but now I want to shut off let's say: npc2's looping sound. I think this is beyond Construct Audio ability right? It's essentially having audio channels.

    I would love to be able to give an object 2 tags or having playing audio in a Family so I could refer to the group and also the individual sound.

  • I see. I'm not sure if there is a proper way to handle that.

    A workaround could be to not loop the sounds automatically, but loop them via events where you have the control.

  • WackyToaster that's what I figured. Doing the looping manually seems like a clever idea though! thanks!

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