ramenecho ramenecho loading

bungamer07 wrote:

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
repeat ()
create a clone of [myself v] :: events
change x by ()
end
set x to ()
change y by ()
end
hide
stop [this script v]

//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 receive [ v]
show
go to x: () y: ()
repeat ()
create a clone of [myself v] :: events
change x by ()
end
set x to ()
change y by ()
Okay, common problem here, easy solution, just put the entire block into something like this and have every clone set the id variable to 1 when they spawn
when I start as a clone
set [Id v] to [1]//this basically gives a way to differentiate between clones and the original sprite.
//You can also have the id set to a different number under specific conditions to make it so you can give specific clones unique processes



if <(id) = [0]> then //set id to for this sprite only and have the main sprite set it to 0 at the start

//insert your entire script in this (if) block, do this for both the custom block and the broadcast block, this will prevent the clones from creating other clones

This should work, if it doesn’t then please tell me! Im happy to help out.

P.S. i can tell by the code you are making a system that fills a specific area with a grid of squares, nice job with it, most of the time when i see code like that it is not very efficient but you did great!