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

#1 2012-07-14 09:55:40

jo3murphy
New Scratcher
Registered: 2012-07-14
Posts: 3

Help!!

Hello,

Am very new to scratch. 

I have sprite '2' which is moving up and down a y-axis in a 'repeat until' control box.  Following the repeat until I have a 'stop script'.  I want to 'until' to depend on receiving a broadcast from sprite 1 but I have no 'i receive' option.

Should there be one?  Is it part of an add on?

I have tried creating a variable that sets to 1 when it receives the broadcast from Sprite 1, then making the 'repeat until' block depend on the variable being set at 1.  But this does not stop the script.

Does any of the above make any sense??

Offline

 

#2 2012-07-14 10:39:43

videogame9
Scratcher
Registered: 2008-05-12
Posts: 1000+

Re: Help!!

There is no "received [message]?" block, and the Scratch team is not planning to add one at this moment. However, I can't understand what is going wrong with the second problem. Perhaps you could post a picture of the scripts you are using?


http://img641.imageshack.us/img641/4118/newvg9logo.png
QUOTE OF THE RIGHT NOW: why are we arguing about dead babies? -videogame9

Offline

 

#3 2012-07-14 11:31:57

jo3murphy
New Scratcher
Registered: 2012-07-14
Posts: 3

Re: Help!!

I am a new scratcher so can't add images i don't think.  Have attempted to add the code below:

The script to move the sprite:

[scratchblocks]
when gf clicked
go to [x:114 y:118]
repeat until <X=1>
   glide 2 secs to x:114 y:-125
   glide 2 secs to x:114 y:118
end
stop script

Script to set the variable:

[scratchblocks]
when I receive Fix x
set X to 1
stop script

Cheers for help

Offline

 

#4 2012-07-14 11:58:06

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Help!!

jo3murphy wrote:

I am a new scratcher so can't add images i don't think.  Have attempted to add the code below:

The script to move the sprite:

when gf clicked
go to x: (114) y: (118)
repeat until <(X) = [1]>
   glide (2) secs to x: (114) y: (-125)
   glide (2) secs to x: (114) y: (118)
end
stop script
Script to set the variable:

when I receive [Fix x v]
set [X v] to [1]
stop script
Cheers for help

Remember to add [/scratchblocks] to the end of your scratchblocks.  smile

Where do you change the X variable and broadcast "Fix x"?


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#5 2012-07-14 13:04:02

jo3murphy
New Scratcher
Registered: 2012-07-14
Posts: 3

Re: Help!!

Aha!  That looks better!

A different sprite broadcasts 'Fix x':

when [space] key pressed
broadcast [Fix x]
stop script
That is the only script I have for the X variable.  Do I need to introduce it elsewhere?

Offline

 

Board footer