Issue with Sound Effects playing inappropriately

0 favourites
  • 4 posts
From the Asset Store
This Student Workbook uses both Construct 3 & 2 encoding. It supplies client-side & php "back-end" encoding.
  • Hi everyone,

    So I'm working on a project in Construct 2. Not a particular game at the moment, just working on building a solid sort of functioning engine to build a game on top of. I've been working on settings and in-game settings, including configurable keys and such.

    Anyway, I have an enemy that upon being destroyed, plays an explosion sound effect. I put a "quit to menu" key in my pause menu that changes the layout to "Menu" upon being clicked. My issue is that upon quitting to the menu, the explosion sound effect plays. I suspect it is to do with all instances of those enemies being destroyed on quit, but I don't know what to do about it. Any help would be much appreciated.

    Thanks <img src="smileys/smiley1.gif" border="0" align="middle" />

    Edit: The other trouble I'm having is that currently when the player dies, it is set to go back to the main menu. When it does this it makes it so that when I press the new game button to go back to that layout, it kicks me straight back to the menu because it hasn't reset. How would I go about implementing a proper new game button?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry to double post/bump my own thread. Just wanted to know if there was anyone out there with any insights. I really can't figure out how to do a proper quit to menu button. Now when I quit to menu, none of my menu buttons work anymore except the "Load Game" button, which is obviously because it is Loading a saved state and "Quit Game" because it just closes the window. The others ("new game" to go to the first layout, "settings" to go to the settings layout) just don't react once I've loaded up the game and quit back to the menu. Any help would really be appreciated.

    Also, does anyone know how best to do bindable keys so that they are saved locally (I plan on publishing my game through node-webkit, so it won't be server dependent.) and loaded up on launching the game? Currently my customisable keys work, but are saved as global variables, and I suspect part of getting my quit to menu button working will involve the resetting of global variables.

    Thanks in advance.

  • 1st problem: Set the sound to play when enemies hp its equal to 0 instead of when destroyed. This way the sound will play only when you kill them and not when Construct does.

    2nd problem: If you are using a global variable to check how many lives the player has, make sure to give him new lifes when you hit the new game button.

    3rd problem: We would need to see your setup. Post a capx or describe exactly how it works here.

  • Thanks, I don't know why I didn't think of that. Really appreciate the help!

    Okay, I'll try to get that on here soon.

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