positioned sound in object

For questions about using Classic.

Post » Wed Oct 30, 2013 9:00 pm

hello I have problems with sound, I'm looking in many topics but can not find solution,
anyone know how to put sound in object (eg, waterfall) and when the player is approaching the sound hear higher

Thanks
B
10
S
4
G
1
Posts: 80
Reputation: 1,618

Post » Thu Oct 31, 2013 2:36 pm

Use "Play at object" and set the player object to a listener. This only works with XAudio2 though
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,201
Reputation: 19,539

Post » Sat Nov 02, 2013 10:11 am

How should I put it?

start of layout(system)-------------water(xaudio2): set listener to player

always(system)-----------------------water:autoplay file apppath&"sounds/water.wav"(loop) at positionwater(object)


not work

more help?
B
10
S
4
G
1
Posts: 80
Reputation: 1,618

Post » Sun Nov 10, 2013 11:16 am

how please ?
B
10
S
4
G
1
Posts: 80
Reputation: 1,618

Post » Sun Nov 10, 2013 5:56 pm

You should only need to set it playing at that object once (start of layout) and keep it looping, the player will only hear it when they are close to the object.

However, it looks more like an issue in your path to the sound file than in the XAudio2 object.

Try: apppath & "/sounds/water.wav"
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,201
Reputation: 19,539

Post » Sat Nov 16, 2013 10:43 am

I do not get to make it work or I dont understand it (I am Spanish), you could put it in condition - action.

I think if I can not do it I will have to put the volume of the object and the distance of the player. And it's complicated

Thanks
B
10
S
4
G
1
Posts: 80
Reputation: 1,618

Post » Sat Nov 16, 2013 8:28 pm

Okay, here's an example cap with sfx file and exe version. Unfortunately if it doesn't work then your computer probably isn't able to play positioned sounds.

I did have to tweak the roll-off and min volume settings of the XAudio2 object in the editor to get it to work.

Anyway, here's the example: https://dl.dropboxusercontent.com/u/4714446/SoundCloseToPlayer.zip
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,201
Reputation: 19,539

Post » Sun Nov 17, 2013 10:02 am

its works good , thanks . With example is better
B
10
S
4
G
1
Posts: 80
Reputation: 1,618


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest