Use the for each

Hello, I want the song to be played thre
blocks
e times in a row, but it is not possible

I think the song is played at the same time.

It is played only once

I also used the time sensor, but it didn't work


You need to use a counter and the when player completed block to start playback again

Excuse me, explain on the block

Start player
Set counter = 0

In when player completed
If counter is less than 3
Add 1 to the counter
Start the player

He did not answer again

Where did I say to use the for each block?

Sorry, I'm using a translator, the English texts are messed up

That's why I say use the block, thank you :grin: :pray: :pray:

The community offers a translator, click on the world icon

Wow, I saw it, but I still didn't understand it :laughing: :pleading_face:

You actually asked to " explain the blocks"

I mean you say on the block

:pleading_face: :sob: :sob: :sob: :sob: :sob:

Use the Player component.

image

(edited to add counter addition)

1 Like

I think you forgot the block that performs incremental or addition changes on the variable

1 Like

You can play a sound 3 times using the sound component, you just need to know the duration of the sound.

Example:
PlaySound3Times.aia (8.3 KB)

However, the best solution is to combine the playing of the sound 3 times in one sound file. You can do that with a sound editor (free):

Remember, if you didn't make the original sound file yourself, you must ensure that you have permission from the author or distributor to use it. Many simply ask for a credit that your App user can see.