new block -- "layer"
-
Like with “x pos” and “y pos” in the motion category, you should also do the same with layering since you don’t know what layer what block is.
-
@the_true_odst Please clarify.
-
@c,
basically a button like this but it shows the layer of the selected sprite:
-
Keep in mind that the layers are relative, and there is no concept of “layer 0”, “layer 1”. What do you expect the value of this new block to be?
-
@info-creaticode Well, I’m not exactly sure, but it should behave like the x pos/ y pos block. The “go forward/backward 1 layer” can be really confusing if there are a lot of sprites and your don’t know what their layering position is.
-
@info-creaticode Looks like it’d be a reporter block called “layer” and in the Looks category near here:
For what it should return as its value, it’d be a number that is how many layers away it is from the back/very first layer. For instance, if I have a project with only 2 sprites, and in the first sprite, I rungo foward 5 layers say layer
then in the second sprite i run
go foward 10 layers say layer
then the
layer
var on them should return 5 and 10.Even if the layers are relative, the backdrop can and commonly is used as the 0th layer, which is what the layer block would use as its reference layer.
-
That’s true. It can be hard to use when there are many different layers.
How about 2 new blocks?
-
go to layer [LAYER]: LAYER can be any number between 0 and 100
-
my layer: a reporter block for current layer
-
-
@info-creaticode That sounds good!