Sound Game - no graphic ( Volume Control )

0 favourites
  • 12 posts
From the Asset Store
Over 1700 16x16 pixel art RPG icons for item and skills
  • Hi

    At start, sorry for my english.

    In past i make a lot of games in click & play app but Construct 2 is new to me and i wanna make serious game.

    In game i wanna make top view map with character exploring room, but player will dont see nothing. He will be only hear a sounds around.

    It's any way to make sound more spacious? And how i can controll volume of sound.

    In short: Player is in front of fan, he hear fan in a front of him and when he go in direction of fan noise just volume up, becouse he is closer.

    Plz help.

  • A capx to show how to use sound volume in C2

    As mentioned in the help line of the "Set volume" action, 0 db is the max volume before your speakers will saturate, -10 db represents 50% of the max volume.

    The problem is audio support in browser is not much at the moment, so you can only use what's implemented in the audio object. (No panning, playrate control works in chrome, not in FF, etc...)

    I don't know how far you can take your idea but it is a good one, keep it up.

  • (No panning, playrate control works in chrome, not in FF, etc...)

    It's not good to hear it, but anyway i will try to make it playable. I think only volume control can be enough to make it good to play.

    Thank for example!

  • I do have a solution that works quite well, I've tested it with some blocks:

    it uses distance comparison. make a trigger event to start playing your music/sound then control it in relation to the distance between the object and your character by implementing something like this:

    where 'Cerberus' is your 'Fan'

    <img src="http://i43.tinypic.com/155s9i8.png" border="0" />

    hope it helps and nice idea :)

  • I do have a solution that works quite well

    Wow, thanks a lot!

    Great example of that what i wanna do.

    And i must say, it's not my idea. I read about game like that, but creators do a kickstarter to get money on recording sound (don't remember title). I just have my own vision of game like that and i wanna to make one :)

    Its can be fun (survival + adventure game style)

  • Can You tell me how set it like on the picture?

    System > Compere two values?

    I can't find it on forum.

  • Yeh it's System > Compare two values.

    in the 'First value' section put distance(Object1.X, Object1.Y, Object2.X, Object2.Y) replacing the object names with your actual objects

    then in the second value section put in the pixel size you want

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks :)

    Everything work great!

    But is any way to dont make that behaviors for every object? Is any way to make group of sprites and make behaviors for every object in that group?

    I just wanna make 10 objects with sound, and dont wanna make so many behaviors for each of them.

  • Hello.

    I found the other way. You don't need to make a tons of events. Just:

    System every tick -> Set volume(-distance(player.X, Player.Y, Sound.X, Sound.Y)/10 dB)

    Maybe u will want to change number "10" to some another. For me it was optimal.

    Sorry for my engl...

  • Hey guys, i dont want to spam so i ask in this thread.

    How can i put this formula in my event sheet: System every tick -> Set volume(-distance(player.X, Player.Y, Sound.X, Sound.Y)/10 dB) i dont get it...

    Thanks.

  • 1 - Add Event

    2 - take the System object

    3 - Add a new action

    4 - put he formula there...

    Sorry but im not at home, so could not check the above mentioned steps... :D

  • Don't make yourself being confused with the formula. Because C2 now supports positioned audio.

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