i have a game I'm making and would love it if you guys could tell how to make a button that picks random 1 to 9
i know there is one of those in "operators but you need to attach it someplace and i don't know what that someplace is.
Offline
Try this:
When Button clicked
Pick random 1 - 9
Offline
Ill make this alot simpler <when[ sprite 1 ( also known as the button ]clicked><pick random( 1 )to( 9
Offline
<when green flag clicked><say[ why am i at this fourm?
Offline
You could do this:
{when button clicked}
[say ((pick random (1) to (9)))]
or
{when button clicked}
[set (variable name) to ((pick random (1) to (9)))]
Offline
thats the same thing I said
Offline
when button clicked pick random 1 to 9
Offline
4lover wrote:
thats the same thing I said
I added a "say" block. The "pick random" itself isn't a block. It has to be inserted into a text field, similar to how you can insert things into "if" blocks.
Offline
babbet wrote:
thanks for everybody who helped
You will find the Scratch community very helpful, so if you need help, don't be afraid to ask! Also another great resource tool is the Scratch Wiki, "Made by Scratchers, for Scratchers."
Offline