How do I control sound better?

Get help using Construct 2

Post » Sun Mar 15, 2015 4:28 am

Did a search, but didn't really find a solution to my problems.

I am having two problems regarding sound in my game. When I start the layout I have music playing right from the start. Whenever something else happens with sound involved (me jumping), the music skips for the first sound. After that everything is fine. Any tips on how I can prevent this?

Also, the way it is now I can just spam the jump button, and the sound will play eventhough the player is hanging in mid-air. Is there any way to prevent this?

Thanks in advance! :D
B
10
S
2
G
1
Posts: 16
Reputation: 642

Post » Sun Mar 15, 2015 5:28 am

If I understood your problem, when your char jumps and it plays a jump sound, the music stops. And when your char jumps, the jump sound plays until he land. Am I right?
Image
B
16
S
7
Posts: 126
Reputation: 1,920

Post » Sun Mar 15, 2015 5:51 am

Almost. The music stops playing the very first time I jump. After that everything works fine.

And the jump sound does not play until he land. It is just that I can spam the jump button and make it so the sound plays while the player is in mid-air, which is kind of strange. Is there a way to check if the player is in the air, and prevent the sound from being played then?

Sorry if I am a little unclear..
B
10
S
2
G
1
Posts: 16
Reputation: 642

Post » Sun Mar 15, 2015 6:07 am

Then the jump sound plays no stop from you pressed jump button until char is in air but not falling?
Image
B
16
S
7
Posts: 126
Reputation: 1,920

Post » Sun Mar 15, 2015 6:54 am

No. not exactly. It plays only once if I just press up once, but I can spam the button in the air which makes the sound play everytime I press it. It's not really a big problem, but it would be nice to prevent the player from provoking this bug.
B
10
S
2
G
1
Posts: 16
Reputation: 642

Post » Sun Mar 15, 2015 7:26 am

Ok, now I understood your situation.
Is your music in the Music folder? And sounds in the Sound folder?
About sound jump problem, try the conditions On jump or Trigger once while true.
Image
B
16
S
7
Posts: 126
Reputation: 1,920

Post » Mon Mar 16, 2015 2:56 pm

Thanks! On true worked :)

I fixed the sound skip problem as well. For some reason I I had set it to play both the music and the jump sound at an object (the background), so they probably interfered with one another or something.

Thank you for the help!
B
10
S
2
G
1
Posts: 16
Reputation: 642


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 42 guests