Problem with sounds

Get help using Construct 2

Post » Thu Jan 21, 2016 4:17 pm

So I made a platform game and now I have a sound problem. I made events like if a rolling stone overlapps some special places, you can hear a sound.
Yeah thats fine, but I just wonna hear the soundeffect when the player is in the window where the event happens. Now you can hear the "rolling stone"
all over the level. How can I make it, to hear the soundeffects just when the player is in the near or on the window? Thanks ! :)
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Thu Jan 21, 2016 4:58 pm

In the event that you made to play the sound, create another condition:

System: Pick by comparison->Object: Stone Expression: distance(Stone.X,Stone.Y,Player.X,Player.Y) < *distance in pixels where you don't want to hear the sound*

Remember to place that as the first condition.

Alternatively use Stone -> 'Is On-Screen', but then it won't work if it happens even a little outside the visible area.
"If you don't build your dream, someone else will hire you to build theirs"
B
12
S
3
G
1
Posts: 53
Reputation: 905

Post » Thu Jan 21, 2016 5:50 pm

Thanks @ VValt ! :)
B
27
S
10
G
3
Posts: 76
Reputation: 3,068


Return to How do I....?

Who is online

Users browsing this forum: dandeliongames, QuantumMMX and 6 guests