Ask here your questions to get help using GDevelop.
By JuanIgnacioG
#70565 Hello. So i dont really know what iam doing wrong. I have made it in different ways already.. Basically i press the mute button and plays again and again the music without stopping it. I think its because the 2 events with mouse button down in the same object, that is why i made "if all of these conditions are true" but it does not seems to work. Any idea? Thank you for your time :)
PS: By the way.. I use the action play a sound instead of play a music file because play a music seems bug or something... it doesnt work to me.

Image
By MattLB
#70569 The problem is that both events will be triggered every time, so the first one mutes it and instantly the second one unmutes it. There are two easy solutions:

1) Put the muting event after the the unmuting event
or
2) Add a condition to check that the animation of Mute =0 in the muting event.

It might also be better to check for a mouse button being released, rather than pressed, otherwise there may still be time for both events to be triggered by the same press.
By JuanIgnacioG
#70576
MattLB wrote:The problem is that both events will be triggered every time, so the first one mutes it and instantly the second one unmutes it. There are two easy solutions:

1) Put the muting event after the the unmuting event
or
2) Add a condition to check that the animation of Mute =0 in the muting event.

It might also be better to check for a mouse button being released, rather than pressed, otherwise there may still be time for both events to be triggered by the same press.


I did what you said. I moved the muting event after the unmuting and didn't work. I used the condition to check the animation of mute = to 0 and didn't work :(. When i play and i mutes it... it works.. but then i cannot unmute it. I made some variations too on what you said and it didn't work either. I am kinda lost now hahah

Image