Physics + Collision + Sound... How? :(

Get help using Construct 2

Post » Wed Feb 01, 2012 7:45 am

Well take a look at my capx first... the issue is quite obvious :(

http://dl.dropbox.com/u/45711709/soundTest.capx

I want to play a sound when the ball hits a block and not just rolls on it but it won't work as you can hear :(

Also i'd like to play a rolling sound when the ball rolls along a block, also have no idea how to do that :/

Anyone got an idea?

Thanks.
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Wed Feb 01, 2012 10:36 am

First of all, when I try your CAPX the chime only rings, wenn the ball HITs and not rolls....so I can't see an issue there...

Then, playing a sound while the ball rolls along the wall - i would use an invisible sprite as an overlay with an ofset of 5 pixs or so, and when the ball is moving and is over the overlay and the collision sound is not playing, play the rolling sound. Weishaupt2012-02-01 10:39:21
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Wed Feb 01, 2012 11:44 am

The Problem is that the hitsound plays repeatedly for me (in firefox)... i tried to fix it with the variable stuff which kind of works but not 100%...

And i didn't implement the rolling sound yet because i didn't know how to tackle it completely... i have the velocity and with your idea of the hidden sprite i could make it work i guess... :)
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Wed Feb 01, 2012 1:11 pm

have you tryed you CAPX with CHROME? Like I said, here the "DING" only sounds when the ball hits the wall
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Thu Feb 02, 2012 12:44 am

Works in FF and Chrome :
Disable your event 4
Make new event

Audio: on ended tag "" (since it's the name you gave to ding)
-> Ball set MakeSound to 0

For the rolling, make a new event

system: compare two values velocity > (at least) 10
system: trigger once while true
-> play ding tag "rolling"

Here's the corrected capx
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Thu Feb 02, 2012 10:45 am

[QUOTE=Kyatric]

system: compare two values velocity > (at least) 10
system: trigger once while true
-> play ding tag "rolling"

Here's the corrected capx[/QUOTE]

This is only true, if the rolling sound has to do with "speed" - if it has to do with objectg contact, this will not work, will it?
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Fri Feb 10, 2012 7:57 am

Thanks for the suggestions guys, i've scrapped the rolling sound for now :/

Couldn't make it work how i wanted it to be and if im gonna waste more time on it i'll never finish the game in time :P
B
33
S
6
G
7
Posts: 338
Reputation: 7,424


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests