Change sound effect with scene variables

I put it that if the player kicks the object, the variable will change and depending on the variable number a different sound effect would play but it only plays the first sound effect and doesn’t play the other two, please help
Here are some screenshots for more context:

Add new text object to your objects put it on scene somewhere you can see it

Now add new event

Modify the text
And in text field type
If you get error type

And now you will see at what number your variable is wen you destroy pot
2nd thing is making sure each sound you selected it is actually different sound

It may be stupid thing to suggest but i seen ppl by mistake actually using copies of same sound with different name

I already tried that, it didn’t work

Wait i think i got your issue

You are checking 4 different animations
And idk if you have 4 of them or 3 of them and one is just mistake

So in first event you check if animation is not broken1 broken2 broken3
Yet in 2nd event you set animation to just broken

I think more sense would be to have event where you check collision of pots with hitter
And then under it in sub event play sounds depending on variable

There are too many trigger once conditions. The second event may be the only place you need it, and that depends on what you do with the broken pot.

I’d remove the first event, and put the action to increase postsound in the second event:

Also instead of increasing potsound as you are doing, you could set

potsound = mod(Variable(potsound), 3) + 1

and remove that last event that sets potsound to 0.

I agree, it could be the animation line. An alternative could be to remove the line before and after and replace it with either:
change the scene variable potsound set to mod(variable(potsound),3)+1
or you could use a random number
change the scene variable potsound set to RandomInRange(1,3)

Thank you all for your help, i give it a go

It’s working now, thank you so much