changing the layer of clones

id: 749885

category: Help with Scripts

posts: 3

im making a game for me and my friends but theres this mechanic i cant seem to figure out how, i want the clone to be on the back layer if my character's position Y is lower then the clone but i dont think scratch can detect the clone's position or change it's layer once it spawned. well i can make it a whole sprite but that is only for last resort if there isnt any way to do this script. (there are also mutiple clones at once and i want them to function individually)

TDLR: anyone knows how to make a clone go back layer if my character's Y is lower than the clone's itself (mutiple clones function individually too)
Vaibhs11 Vaibhs11 loading
The x position block does return the clone's x position under the any hat block except ‘when flag clicked’:

when I start as a clone
say (x position) // Clone says the x position of the clone

when [space v] key pressed
say (x position) // Clone says the x position of the Clone and Sprite says x position of the Sprite

when I receive [message1 v]
say (x position) // Clone says the x position of the Clone and Sprite says x position of the Sprite

// and so on...

I'm not sure what you mean by what you said about the project, so can you share the project and provide the link?
Also, next time you have a question about coding, post it in the Help with Scripts forum.
Wolf_Link21 Wolf_Link21 loading
I think griffpatch made a tutorial for what you want https://www.youtube.com/watch?v=bxjbYJLAUYU