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

#1 2011-06-25 17:12:57

DrChappers
New Scratcher
Registered: 2011-06-25
Posts: 1

Easy Scratch randomizer HELP!

hi i am trying to make a scratch randomizor so when ever i press m it plays a different tune can anyone help?
What i have got so far:<when[ M ]key pressed><stop all sounds><broadcast[ Random music>
this broadcasts to
<when I receive[ random music><if><play sound[  ]and waits><play sound[  ]and waits><play sound[  ]and waits><play sound[  ]and waits>

thats what i have got so far

Offline

 

#2 2011-06-25 17:23:38

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Easy Scratch randomizer HELP!

[blocks]<pick random(  )to( [/blocks]

Is that what you want?

Offline

 

#3 2011-06-25 17:25:06

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Easy Scratch randomizer HELP!

Try this.
http://www.majhost.com/gallery/veggieman/shack/blcoks.png


Posts: 20000 - Show all posts

Offline

 

#4 2011-06-25 21:19:58

frizzlepuss893
Scratcher
Registered: 2011-06-10
Posts: 100+

Re: Easy Scratch randomizer HELP!

do you mean like when you press a button it plays a random song? try when (button) pressed, pick random one to (however many sounds there are). make a variable called soundtracks and make it set to the number. then make it check: if soundtracks = 1, play this song. if soundtracks = 2, play this song... and so on. hope this helps  smile

(and if you want it to only play each tune once, try putting in each if, broadcast song # played.)


"Wait, what?"-Frizzlepuss. Jumpathon 5! play now!
The scratch song! Congratulations scratch! 2 million projects!

Offline

 

Board footer