Adding sounds

  • As a Construct 2 newbie, I wanted to add sounds to my game (of course!) and hunted around in the tutorials and forum for pointers on how to go about it, but couldn't find any.

    In the end, througn trial and error (quite a bit of that), I worked out how to do it (insert an Audio object in the Layout, import sound files in the Project Bar, ...).

    Is there room for a mini-tutorial on adding sounds (I'd be happy to write it)?

    Or have I missed seeing documentation that was staring me in the face?

  • I guess this would make a useful tutorial for beginners - we're still working on our manual but it generally is going to be a reference rather than a 'how-to' guide. So try writing up a tutorial! Anyone can submit tutorials on the site.

  • Thanks for the prompt and positive response, Ashley. I'll get on to it.

    BTW, I think Construct 2 is a FANTASTIC game engine/dev environment. I started writing games (just as a hobby) in 1987 in USCD Pascal and Turtlegraphics. I marvel at the Construct 2 UI and code generator - absolutely BRILLIANT work!

  • OK, I've now completed and posted my Adding sound - a beginner's guide tutorial.

    Since I came up with the proposal to write this tutorial, the Manual has been published, covering quite a bit of the material I'd thought of incorporating. So following Ashley's suggestion, I've oriented my tutorial to be a practical step-by-step guide and a sequel to the main Beginner's Guide , with links to relevant sections of the Manual.

  • I don`t want to spam with new threads so i`ll ask here. I have my game finished, sound is ok when i try to play the game offline from my computer or in preview mode in C2.

    The problem is when i upload the game on the internet there is no sound, i imported few .wave sounds and C2 converted them in to m4a and ogg...can`t see why they are not played while game is uploaded on the internet. I have sound in Sound and Music folders in C2, but both wont play. Also i replace the same sounds in the folder converted with audacity after i exported the game in HTML5, but no result. Please help

  • legora: check for errors in the browser. See also the section on "No audio plays".

  • [15:20:00.037] GET racing-flashgames.com/HTML%205%20Game/Parking%20Lot/media/menu%20sound.ogg [HTTP/1.1 404 Not Found 62ms]

    Well this is the error i guess, if you know how to fix it i`ll be glad :), btw i can`t find "no audio plays" section

  • ok now i need to place this somewhere, .ogg = audio/ogg i added this in offline appache file in game but it doesn`t work. My website server is on IIS i think maybe thats the problem?

  • It is ok, i wrote to my host i hope he`ll fix it.

  • Can someone advise how to stop the background music from the first layout and start the music for the second layout at the same time? My project just keeps playing the first layout/level music all the way through.

  • Try Construct 3

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

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

  • Can someone advise how to stop the background music from the first layout and start the music for the second layout at the same time? My project just keeps playing the first layout/level music all the way through.

    It bugged me that this wasn't directly answered...

    The simple answer is:

    On Touch/Mouse ~ Audio ~ Stop "MenuBGM"

    The slightly less simple answer:

    Here's an ordinary scenario- you have a menu select screen, and when you click on Level 1-1, you want

    1. The Menu Layout to go away, and

    2. For Level 1-1 to load WITHOUT having the Menu music still playing.

    I sometimes have a problem putting audio commands inside of "On End of Layout" Actions, so I put the Stop "MenuBGM" Action AND the Go To Layout Action in the button.

    More specifically, I create a sprite called MenuSelect, and attach the various kill commands to that button.

    That way, I can make a menu with several level options, each one leading to a different layout. The MenuSelect Sprite is then used to "Highlight" the various levels, and whenever the player "clicks" on the level they want to go to, they're actually clicking a conditional MenSelect button. That way you get your kill switch without having to rely on the On End of Layout condition, which doesn't always provide the expected result.

    But I'm still learning, too!

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