This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-12 23:06:13

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

help with my random button

how do you make a randim button broadcast something if the number is 1 and only 1


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#2 2011-08-13 00:56:05

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: help with my random button

I think this may be what you're looking for.

Code:

When button clicked
if <(pick random 1 to x) = 1>
     broadcast message

http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer