Issue with Sound Effects playing inappropriately

Get help using Construct 2

Post » Sat Aug 03, 2013 9:54 pm

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

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?Exuro2013-08-03 22:17:47
B
10
S
2
G
2
Posts: 12
Reputation: 1,709

Post » Sun Aug 04, 2013 4:42 pm

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.
B
10
S
2
G
2
Posts: 12
Reputation: 1,709

Post » Sun Aug 04, 2013 10:05 pm

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.
B
10
S
4
Posts: 133
Reputation: 1,543

Post » Thu Aug 08, 2013 11:25 pm

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.
B
10
S
2
G
2
Posts: 12
Reputation: 1,709


Return to How do I....?

Who is online

Users browsing this forum: FabianB, Vodakman and 9 guests