Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » changing the layer of clones
- letsgoyeeting
- Scratcher
3 posts
changing the layer of clones
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)
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
- Scratcher
1000+ posts
changing the layer of clones
The x position block does return the clone's x position under the any hat block except ‘when flag clicked’:
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.
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
- Scratcher
100+ posts
changing the layer of clones
I think griffpatch made a tutorial for what you want https://www.youtube.com/watch?v=bxjbYJLAUYU
This is dave
:D :: hat :: motionHe protects my from evil kumquats.
Please follow me if you find my response helpful and give me any ideas for my game https://scratch.mit.edu/projects/992371983/
- Discussion Forums
- » Help with Scripts
- » changing the layer of clones