Select Random Button and change it's text

Hi guys,
Do you know how I can select a random button from a list of buttons and then change its text. This is the list that I have.

Init a global list Buttons containing the component blocks for those buttons.
The component block is always the last block in each component's block pallette.

Use the Any Block generic buttons on a randomly chosen Button component from that list.


your "join" creates a string that cannot work since you want to adress a button (which is not a string rather a complex component). Your list ("make a list") contains only one element, the mentioned string. But you want to have a list of more (buttons) from which you can select one.

1 Like

Thanks,
How would I make the program, so that if the button already has text on it it would generate a new random button.

Keep a list of all the buttons you have added text to.

Alternatively, remove a button from your button list after it has been chosen and you used it.

1 Like


This automatically creates a new random number if a button chosen already contains text. ABG recommended similarly. Further development in your hands.

2 Likes