How do I stop this sound repeating?

Just started using Construct 2? Post your questions here

Post » Mon Jun 09, 2014 11:35 pm

There are three slot tiles, I'm trying to play the sound once after each tile stops moving.

Image
B
6
S
1
Posts: 13
Reputation: 426

Post » Tue Jun 10, 2014 2:50 pm

Try to use : system -- trigger once.

Or upload sample capx, I will try to fix it.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Tue Jun 10, 2014 5:05 pm

Thank you, this helped. I have it working as intended but there has to be a more efficient way than I have managed it.
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 13
Reputation: 426

Post » Tue Jun 10, 2014 6:44 pm

I think :
System - slotTile.AnimationSpeed = 0
System - Trigger once

will be enough.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Tue Jun 10, 2014 7:44 pm

Doing that only plays the sound when the first tile stops.
B
6
S
1
Posts: 13
Reputation: 426

Post » Tue Jun 10, 2014 9:49 pm

I wish I had something to test it myself, but I would try something along the lines of:

For each: slotTile
slotTile > Animation: onFinished

Edit: That is assuming that I understood correctly. You want it to play the sound when the tile's "animation" stops moving right?
B
28
S
5
G
5
Posts: 98
Reputation: 4,794

Post » Tue Jun 10, 2014 11:47 pm

That I do, like I said it is currently working but seems very long winded at the moment. Have a play.
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 13
Reputation: 426

Post » Wed Jun 11, 2014 12:56 am

To me, nothing is wrong with the sound. It all goes *click* properly. Maybe I am misunderstanding? The only thing I notice wrong is that sometimes it instantly *clicks* one in place as soon as I press the button.
B
28
S
5
G
5
Posts: 98
Reputation: 4,794

Post » Wed Jun 11, 2014 2:33 am

Yeah, with the allowControl variable I sorted to initial click sound. That wasn't included in the .capx though as I don't want to share my full project at the moment. I'm happy to use the current iteration, I just figured there may be a neater more optimized way to achieve the same effect. Thank you both for commenting, consider this issue solved.
B
6
S
1
Posts: 13
Reputation: 426

Post » Thu Jun 12, 2014 1:29 pm

I don't have access to C2 where I am now, but I did this in Paint to illustrate my point. You should be able to simplify your code like this. It should do the same, and it's easier on the eyes.
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 41
Reputation: 762

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests