Mar 26, 2024 19:17:02
Trouble with the broadcast block. (I'm bad at coding but I'm trying to code without tutorials)
view on scratch
view on legacy ocular
ramenecho
loading
Can you please convert this to scratch blocks? Like this for example I use a code for generating squares:
define (without screen refresh):
show
go to x: y:
repeat until touching color (basically I have a grey line at the bottom of the project so it stops):
I repeat :
I I create a clone of myself
I I change x by
I I________I
I set x to
I change y by
I____________________________________________________________________________I
hide
stop this script
I made a code where every -32 in y the player moves 32 up and sands a signal “up” so the squares move up and a new layer generates. If you run the code manualy it works but when you put it in a "when i recieve " block it breaks (clones go up to the 300 limit and the block is just moving, swiching lanse up and down):
when i recieve
show
go to x: y:
repeat :
I create a clone of myself
I change x by
I________I
set x to
change y by
Important to note the squares and the player are 32 by 32 cubes
(Probably deleting this later)
when green flag clickedJust hit that little blue block icon in that bar at the top, you can also use the check to get a preview of that code, to display a comment in the code just use a //
if <using text to describe code> then
broadcast [cant read v]
end