How do I avoid to click 2 buttons at the same time?

Hello, i have developed a simple game for my daughter, once you click animal , it will say a sentence and then do a sound.
It works, but sometime my daughter click 2 buttons at the same time so sentencens and sounds are overlapped (eg lion with sheep)
How can avoid to click 2 buttons at the same time? Normally i would hide other buttons, but i can't this time; maybe i can try with a function that disable click in another buttons once one is clicked, like a when click set visible to false , i would try in this way, so once one is clicked, others 8 buttons could be disabled ; could work? thanks!
2
here you have block about one single button, basically once is clicked, make unvisible rest of the animals and show one clicked bigger

Use a routine to disable (Enabled = false) all the other buttons when one button is pressed. After the sound is played enable all the buttons (Enabled = true)

You can create a list of all the buttons, then use a procedure to disable all the buttons after a button press. You probably want this in order to prevent the same button being pressed twice in quick succession.

thanks! so i'll try to do somethink like this
if button 1 is clicked will be (supposing to have 4 buttons)
set button2 ENABLED to FALSE
set button3 ENABLED to FALSE
set button4 ENABLED to FALSE etc , while when sound is completed
would be
set button2 ENABLED to TRUE
set button3 ENABLED to TRUE
set button4 ENABLED to TRUE

or instead exist a "other button function" including all the others?
anyway thanks, now i have a solution :slight_smile:

That is the idea. Some example blocks of one way to do this:

2 Likes

This is a bit late but anyway...
Could you set all the buttons to 'enable' false then enable them all in the 'after sound play' event.

That would take care of hitting the same button twice as well.

Good app though :slight_smile:

That is what my blocks do

1 Like

Yes I should have looked better before writing.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.