Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I affect non-clones wiith the go to () block?
- Beedgehog
- New to Scratch
2 posts
How do I affect non-clones wiith the go to () block?
If I use the move steps () block, I'm able to affect the non-clone. However, I want it to teleport to a given position, but it won't do this unless it's a clone
- NamePending_
- Scratcher
100+ posts
How do I affect non-clones wiith the go to () block?
Sounds like you want the
go to x: () y: ()block to only affect a clone. In that case, I would make a variable called something like:
(am i a clone?) // set to 0, MUST BE FOR THIS SPRITE ONLYThen, in the code for clones, have this at the beginning.
when I start as a cloneOnce you've done this, set up a “move” broadcast to use in place of the motion block. Then, use this code in the sprite you want to move:
set [am i a clone? v] to (1)
when I receive [new message v]I hope this helps!
if <(am i a clone?) = (1)> then
go to x: () y: ()
end
Last edited by NamePending_ (March 23, 2024 22:25:29)
Welcome to my signature!
Was this post helpful? If so, please consider checking out my profile!
say pasta in it please
100 POSTS YESSIRRRRRRRR
- Beedgehog
- New to Scratch
2 posts
How do I affect non-clones wiith the go to () block?
Sounds like you want thego to x: () y: ()block to only affect a clone. In that case, I would make a variable called something like:(am i a clone?) // set to 0, MUST BE FOR THIS SPRITE ONLYThen, in the code for clones, have this at the beginning.when I start as a cloneOnce you've done this, set up a “move” broadcast to use in place of the motion block. Then, use this code in the sprite you want to move:
set [am i a clone? v] to (1)when I receive [new message v]I hope this helps!
if <(am i a clone?) = (1)> then
go to x: () y: ()
end
Sorry for the confusion, however I did say ‘non-clone’
- deck26
- Scratcher
1000+ posts
How do I affect non-clones wiith the go to () block?
Sounds like you've put the movement code in a ‘when I start as a clone’ script but the sprite doesn't run those. You need to put the code in a script that the sprite does run - in a green flag script for example.
- Discussion Forums
- » Help with Scripts
- » How do I affect non-clones wiith the go to () block?