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

#1 2009-12-27 14:10:52

Drac3997
Scratcher
Registered: 2009-05-27
Posts: 1

Help With Variables

There are many more things I could acomplish in my scratch project if I could know how to do 1 thing, something like this

if variable=1
brodcast:lol

how do I make an "when variable=# do x" sequence? Is it even possible?

Offline

 

#2 2009-12-27 16:39:13

ma88hew
Scratcher
Registered: 2009-09-08
Posts: 5

Re: Help With Variables

You should get the = from the Operations menu, the variable from the variables menu (drag the name of it into the = block) and then just type the # in.
If you want the project to constantly check the variable for equalling the number, it is best to use a forever block. For example:

<when green flag clicked>
<forever>
<if><( <{ Variable }> <=> 1 )>
<broadcast[ lol ]
<end>
<end>

Did I explain it well enough?

Last edited by ma88hew (2009-12-27 16:40:44)


http://img46.imageshack.us/img46/4350/anvalanche.jpghttp://img704.imageshack.us/img704/7572/cavezoomer.jpg

Offline

 

#3 2009-12-27 17:45:06

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Help With Variables

You can also use a wait until block - but use the right way for what you're doing!  smile


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

Board footer