Sounds problem need help.

  • here you go the whole test project

    dropbox.com/s/acd10oltidaaos8/Test.rar

  • I looked at you program and got it working, but what exactly the problem is im not sure. However I think that your background music might be to big or something that it causes some problems. However Im not sure and if that's the exact problem.

    But you can fix it like this.

    1. Make that "Game_loaded = 0" variable that I mentioned.

    2. And in the "Start layout at the very bottom set it to 1.

    3. In the "bullet_created" add the condition "Game_loaded = 1".

    (This is where it gets weird as that should work.)

    4. Move the play music in the "Start layout" event to the top of where you have the others. (That's simply because it easier to work with that way ) <img src="smileys/smiley1.gif" border="0" align="middle" />

    5. In the top of the start layout before you start playing the sounds, add a preload for both sounds. Especially for the music, as its the one that's causing the problem and not the bullet sound.

    That should make it work.

    I would strongly suggest you to use groups and more event sheets and just include them in the main one, that will make it a lot easier for yourself to debug and work with the program, especially when it gets bigger.

    Personally I would organize it like this if I were you:

    Make the following event sheets:

    "Enemies" - Everything that relates enemies you add here.

    "Player" - Player controls, death. Weapon sounds etc.

    "Game" - General game stuff, like "New game", "Exit game", "Turn on/off sound", "Playing music" and "Score"

    "Scenery" - Everything that relates to the background like creation of stars etc.

    In regards to using groups, its very easy to only show what you need, and to find stuff that you need.

    For instant if you have a "Player" event sheet. You can make a group called "Controls" and under that group you add all stuff that relates to player control, and in the group description you can short explain what the category does.

    Lets say you wanted you spacecraft to be able to do some speed boost. You could just add a new group underneath the "Control" group called "Boost" and then you have everything organised.

    Anyway just an advise, as I have dumbed a lot of projects in the pass, because I didn't organize them, and at some point you simply loose track of what's happening and finding some error is really hard. <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks it works! it was the preload! thanks a lot! thanks for the advice in event sheets i didn't know you can add more!

  • I struggled with this too. It should have been fairly straight forward. Here's my alternate solution:

    RiUalt

    Preload the sound in On start of layout, and play the sound at the spawn time.

    Also, you can use Save as single file, to get a CAPX file, which is your complete game for uploading.

  • thanks again!

  • game is ready! scirra.com/arcade/shooter/6236/revolution-in-universe

    thanks for your help I hope you like it!

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