Positioned Audio at Position VS at Object

Discussion and feedback on Construct 2

Post » Thu Jun 12, 2014 10:09 am

Hi, i'd like to know if u use play at position say Sprite.X, Sprite.Y, if that sprite is a moving object, will the sounds position move with it or stay at the start position?

In a simple new project I can get Play at Object working no problems, just doesn't work at all in my more complex project. Really annoying that I have no controls to manually adjust left/right stereo mix using variables.
B
34
S
5
G
1
Posts: 78
Reputation: 3,397

Post » Thu Jun 12, 2014 10:46 am

I think I figured it out, it seems as though there is bug in positioned audio code in the sense that it you create an object on start of layout - that object will NOT play sound IF you Positioned Audio: Play at Object also on start of layout.

So it seems the object needs to already exist on the layout before hand, on you have an invisible object that positions itself to your moving object.
B
34
S
5
G
1
Posts: 78
Reputation: 3,397

Post » Fri Jun 13, 2014 2:25 am

That's not really a bug; how can you position a sound at an instance that doesn't exist yet? Use a Wait command, or On Created, or something similar as a workaround.
B
12
S
3
Posts: 39
Reputation: 1,001

Post » Thu Jun 26, 2014 1:30 am

seven wrote:That's not really a bug; how can you position a sound at an instance that doesn't exist yet? Use a Wait command, or On Created, or something similar as a workaround.


Yes you're right, I figured it out that same day with a Wait action of 0.1 seconds after start of layout. And that fixed the problem since the object has already been created before the sound is positioned to it.

I know it's not technically a bug, but what if the the positional sound was programmed to try again one more tick after layout start if the object named was not found on the first tick??
B
34
S
5
G
1
Posts: 78
Reputation: 3,397

Post » Sat Jun 28, 2014 1:50 am

"Wait 0 seconds" is the equivalent of waiting one tick.
B
12
S
3
Posts: 39
Reputation: 1,001

Post » Mon Jun 30, 2014 3:35 am

seven wrote:"Wait 0 seconds" is the equivalent of waiting one tick.



Thanks seven, but for my own logic's sake i'll leave it at Wait 0.1 seconds hehe
Becos Wait 0-seconds looks like a bug i might accidentally delete in future lol
B
34
S
5
G
1
Posts: 78
Reputation: 3,397


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests