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

#1 2010-06-27 20:26:01

Zoogle11
New Scratcher
Registered: 2010-06-27
Posts: 3

IF statements

When i use the IF i cant use variables how do i use them so i use

<when green flag clicked>
<repeat( 100)>
<point towards( mouse pointer)
<glide( 0.3 )secs to x sad  mouse x )y sad  mouse y)>
<if><touching[ mouse-pointer]>
<say[  i win]for( 2 )secs>
<end>
<end>
<say[ you win]for( 2 )secs>

Offline

 

#2 2010-06-27 20:32:26

mariobrosrule
Scratcher
Registered: 2008-06-09
Posts: 1000+

Re: IF statements

you put in operators (green blocks)

Offline

 

#3 2010-06-27 21:38:16

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: IF statements

Yes, you have to put the blocks with rounded corners into blocks with jagged, diamond-shaped edges. For instance, put the orange variable blocks with rounded corners into the diamond-shaped <(  <=>  )>[/blocks] block.

Although, you weren't very clear... Is there something you don't understand that I haven't addressed? Please don't hesitate to post it and somebody will help it out.

Offline

 

#4 2010-06-28 01:31:38

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: IF statements

Scratch Wiki has articles on those different blocks - this article is about the diamond shaped blocks, Boolean blocks - and this is about the rounded blocks, Reporter blocks.

Hope that helped!  smile


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

Board footer