How do I play sounds only in a distant radius

Get help using Construct 2

Post » Wed Feb 18, 2015 3:24 pm

Right now I'm just playing wilderness ambiance noises in random X and Y coordinates in the whole viewport. I however would like to make the effect more advanced and get these sounds to only play in a distant radius around the player and ignore the close radius because the player is never going to see these creatures making the noises they make and it's weird when one plays right next to the player because of this.
B
29
S
8
G
1
Posts: 199
Reputation: 3,026

Post » Wed Feb 18, 2015 3:37 pm

Add a line of sight behaviour with the radius you want, and play sounds only if the player doesn't have line of sight?
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Wed Feb 18, 2015 3:54 pm

I don't think that'd suit my purposes but I must commend you because you got me thinking that my best bet would probably be to make an object set along sine and cosine around the player with a minimal value to the radius of the circle it's making and play the sounds from it's X and Y positions.
B
29
S
8
G
1
Posts: 199
Reputation: 3,026

Post » Wed Feb 18, 2015 11:10 pm

Yep, or just use a circular invisible sprite pinned to the player and only play sounds if it's not overlapping the origin of the sound. But I'm lazy, your solution sounds more impressive :D
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Wed Feb 18, 2015 11:42 pm

Yeah the method I wrote above works pretty good. I had to increase the volume of my wildlife ambiance but it was worth the extra effort involved.

And hey, I say to each his own, every game is a case by case basis. :p
B
29
S
8
G
1
Posts: 199
Reputation: 3,026


Return to How do I....?

Who is online

Users browsing this forum: cjbruce, Zoussu and 19 guests