Discuss Scratch

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 ONLY
Then, in the code for clones, have this at the beginning.
when I start as a clone
set [am i a clone? v] to (1)
Once 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:
when I receive [new message v]
if <(am i a clone?) = (1)> then
go to x: () y: ()
end
I hope this helps!

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?

NamePending_ wrote:

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 ONLY
Then, in the code for clones, have this at the beginning.
when I start as a clone
set [am i a clone? v] to (1)
Once 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:
when I receive [new message v]
if <(am i a clone?) = (1)> then
go to x: () y: ()
end
I hope this helps!


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.
AZBIDABOI
Scratcher
100+ posts

How do I affect non-clones wiith the go to () block?

Use “AM I A CLONE?” variables and set it to 1 on the clone

kokaAOALAAKAOKAOkokoko ‎ ‎ ‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

Powered by DjangoBB