Comments

Log in with itch.io to leave a comment.

Hello, I wanted to ask how the layering with the clones worked. I tried to find out myself but I couldn't manage to do it. Could you perhaps make a sample project with a sprite with 3 clones (with someway of seeing that they are different with the color effect, costume or whatever) that get placed at a layer different from the one they spawn at using LM1?

(+1)

It’s been a while so I’ll try to recall as well as I can. When a clone is created it’s automatically given an ID and added to the layer-buffer queue, then when layer runtime gets called that broadcast is also called which only works on clones, once the clones receive that broadcast they set to their layer, I would show you an example but I personally forgot how to use this, I typically just render stuff on a pipeline now so layers haven’t been much of an issue

''once the clones receive that broadcast they set to their layer''

I want to know how I can tell a clone in which layer it should be, that is what I don't know. What controls that? And you said that the set layer block and a couple other blocks were clone compatible, how do you refer to a clone?

I used the looks+ extension and clones extension, though the clones one isn’t necessary. So when the broadcast is called, everything in that sprite receives it, that goes for the any of it’s clones and itself, you can identify if the thing receiving the broadcast is a clone by using a for this sprite only variable or a is clone? boolean from the clone extension. Then with the looks+ extension you can set the clone’s layer, and the clones layer is stored right where any sprites layer would be, the only difference is that it’s added when a clone is instanced rather than being verified during runtime like it’d be typically done in the runtime function with sprites, I hope you understood any of that

Thank you for answering so quickly! I understand what you're saying. In the codeblock you described it sets the clones layer to the value of its Lm.cloneid/ftso (which is the key right?) in the string v.v (lm.ld). So it sets the layer to the key.  My question was how I could set a clones layer, in other words, how can I set the value of a key. If it checks the value of a key, and there is no value, you can't expect the layer to change right? How do I give it value, I can't find any place where I could do that. A  circle around the number I should change is all I need. The screenshot is in the sprite with the clones called Sprite1. I tried sending but it doesnt let me send the screenshot for some reason, do you have discord?

I do, droplets2113, and I think I understand what you mean now, the clones I’d stores where it’s layer data is in the layer list, so when the clone layer is set it uses the id to find it’s entry on the list, so we set the clone layer to it’s layer using id, not setting it to the id. And if you mean json like key and value, you can use json extension to read the value of a key, sorry I have trouble understanding what you mean