How do I Use Positioned Sound?

Get help using Construct 2

Post » Tue Jan 17, 2017 6:41 pm

I would like to implement advanced features like positioned sound in my game, but can't figure out how to work it. I also tried searching for a tutorial but couldn't find one. Anyone know how? Thanks in advance
B
23
S
11
G
52
Posts: 137
Reputation: 27,881

Post » Wed Jan 18, 2017 4:24 am

First add your listener object (usually the player sprite) on the start of the layout. Then add the sounds to the objects you want in the event sheet. Then click on the Audio properties menu and tweak the different settings until you get everything exactly how you want. The C2 manual will tell you what all the different settings do.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Wed Jan 18, 2017 5:48 am

If I remember, in the examples folder of c2, is a capx that does what you need.
B
36
S
10
G
9
Posts: 212
Reputation: 6,945

Post » Wed Jan 18, 2017 6:24 am

Burvey wrote:First add your listener object (usually the player sprite) on the start of the layout. Then add the sounds to the objects you want in the event sheet. Then click on the Audio properties menu and tweak the different settings until you get everything exactly how you want. The C2 manual will tell you what all the different settings do.

Thank you, I actually have since figured it out. I should have played with it more before posting :)
B
23
S
11
G
52
Posts: 137
Reputation: 27,881

Post » Wed Jan 18, 2017 8:47 am

Does it lag or did I do something wrong when I tried it last year? I then decided only to use play instead of this. Any opinions?
B
29
S
15
G
17
Posts: 137
Reputation: 10,848

Post » Wed Jan 18, 2017 3:18 pm

@tomi71 If your audio was lagging then you were most likely playing on a device that wasn't up to specs.

Or, there is a known browser issue where when you play positioned audio for the first time there will be a pause while the sound information loads up. You can work around this by playing the positioned audio for the first time at the start of the layout at something like -1000db. (You should do this at before the player starts the game, like on the title screen layout for example). That allows the positioned sound info to get processed by the browser at the start of the layout without the player actually hearing the sound.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests