How to make random amount of sprites visible?

I'm making a simple maths game where a random number of sprites will appear and the user will press 1 of 3 buttons, with the correct button corresponding to the number of sprites visible.

I am struggling to work out how to make a random number of sprites invisible as all them are currently staying visible. On top of this, I also would like to know how to make one of my buttons' text correspond to the number of visible sprites.

Any ideas?

You can use the Random Integer block from Math section to show random number of sprites. Then put the button's text into a variable and check if it is equal to the random integer we chose earlier

1 Like

Ok, thanks. I'll give it a go

Ok, I hope it works for you.

Is it working?

Almost, I've got the sprites to randomly appear, but now I need to make one of my buttons to correspond to the sprites visible

1 Like

Visit this page :point_up:

1 Like

Please let me know if this works

Thanks heaps, I got it working!

1 Like

Welcome. Happy to know it works