Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » the cloning tutorial: the basics of cloning.
- BC825
- Scratcher
58 posts
the cloning tutorial: the basics of cloning.
Yes, it is! This si what you do: Is it possible for the clones to interact with one another (I'm trying to do an if statement when two different clones touch)
when I start as a clone
if <touching [a sprite v] ?> then
do whatever you want it to
end
The problem with this is it will sense if it si touching the clone AND the main one, unless you hide the main one. I hope this helps!
Hi. Can you hear me? I'm a dust ball, and I'm here to tell you that you should wash your hands, wear a mask, and stay 6 feet away from other people whenever possible. You may just save a life by doing that.
- yekoye252
- Scratcher
21 posts
the cloning tutorial: the basics of cloning.
i reported this to be stickied! To add to this (almost sticky worthy) tutorial, here is how you make multiple clones of the same sprite that do different things:
First you create your clones of coursewhen green flag clickedNOTE: When you create the variable ID you must check the box that says “for this sprite only”
set [ID v] to [1]
repeat (3)
create clone of [myself v]
change [ID v] by (1)
end
Now to apply this ID of the clone, we do thiswhen I start as a cloneSo you can see this “ID” for each clone changes each time you create one. The reason that they don't all read the ID as the same number is because it's “for this sprite only” which means that each clone stores that variable by its self so only that clone can change the variable for that clone.
if <(ID) = [1]>
go to x: (100) y: (100)
else
if <(ID) = [2]>
go to x: (-100) y: (-100)
else
go to x: (0) y: (0)
end
end
Hope that makes sense to you readers learning about the wonderful world of cloning.
- Fireguyx2
- Scratcher
1 post
the cloning tutorial: the basics of cloning.
Hello!
I am making a platformer and I was wondering if you could tell me how to create a shadow for my platformer that follows it around???
I would greatly appreciate it.
I am making a platformer and I was wondering if you could tell me how to create a shadow for my platformer that follows it around???
I would greatly appreciate it.
- lambfrs
- Scratcher
9 posts
the cloning tutorial: the basics of cloning.
I'm making a minecraft project and can't get the clones to move, Any ideas?
- Vibrato
- Scratcher
1000+ posts
the cloning tutorial: the basics of cloning.
Try creating your own topic - your post is more likely to be seen there. I'm making a minecraft project and can't get the clones to move, Any ideas?
I understand about indecision
In software development, deleting, it's just a concept. Some software might have a delete button and when you click it a thing disappears, but it's not really gone. Okay, it's not gone from the memory.
chances are nobody will find your account, so nobody will follow you.
I'm going to close this suggestion as it is technically implemented and rejected at the same time.
- lambfrs
- Scratcher
9 posts
the cloning tutorial: the basics of cloning.
when I start as a clone
create clone of [ v]
- Airobomarordr
- Scratcher
3 posts
the cloning tutorial: the basics of cloning.
To add to this (almost sticky worthy) tutorial, here is how you make multiple clones of the same sprite that do different things:
First, you create your clones of coursewhen green flag clickedNOTE: When you create the variable ID you must check the box that says “for this sprite only”
set [ID v] to [1]
repeat (3)
create a clone of [myself v]
change [ID v] by (1)
end
Now to apply this ID of the clone, we do thiswhen I start as a cloneSo you can see this “ID” for each clone changes each time you create one. The reason that they don't all read the ID as the same number is because it's “for this sprite only” which means that each clone stores that variable by its self so only that clone can change the variable for that clone.
if <(ID) = [1]>
go to x: (100) y: (100)
else
if <(ID) = [2]>
go to x: (-100) y: (-100)
else
go to x: (0) y: (0)
end
end
Hope that makes sense to your readers learning about the wonderful world of cloning.
what if I want to have 100+ clones doing different things? I don't have time for all that scripting…
- Airobomarordr
- Scratcher
3 posts
the cloning tutorial: the basics of cloning.
I am still worried about what to do with clones:
when green flag clicked
create clone of [ v]
when I start as a clone
say [] for (2) secs
move (foo) steps
Last edited by Airobomarordr (Sept. 26, 2020 08:39:44)
- Airobomarordr
- Scratcher
3 posts
the cloning tutorial: the basics of cloning.
To add to this (almost sticky worthy) tutorial, here is how you make multiple clones of the same sprite that do different things:
First, you create your clones of coursewhen green flag clickedNOTE: When you create the variable ID you must check the box that says “for this sprite only”
set [ID v] to [1]
repeat (3)
create a clone of [myself v]
change [ID v] by (1)
end
Now to apply this ID of the clone, we do thiswhen I start as a cloneSo you can see this “ID” for each clone changes each time you create one. The reason that they don't all read the ID as the same number is because it's “for this sprite only” which means that each clone stores that variable by its self so only that clone can change the variable for that clone.
if <(ID) = [1]>
go to x: (100) y: (100)
else
if <(ID) = [2]>
go to x: (-100) y: (-100)
else
go to x: (0) y: (0)
end
end
Hope that makes sense to your readers learning about the wonderful world of cloning.
what if I want to have 100+ clones doing different things? I don't have time for all that scripting…
- Mineturtle10000
- Scratcher
1 post
the cloning tutorial: the basics of cloning.
How do you get it to where when deleting a clone it will only delete one at a time rather than all of them.
- Voblast
- Scratcher
8 posts
the cloning tutorial: the basics of cloning.
when green flag clickedi made a stamper
forever
if <mouse down?> then
stamp
end
end
- Nezon
- Scratcher
1000+ posts
the cloning tutorial: the basics of cloning.
STOP NECROPOSTING!!!
This is my signature (it goes automatically under every post I make)! Here is a bit of advice on foruming, by the way. Don't do SAND. SAND means four words.
SAND means Spam, Advertising, Necroposting, and Derailing.
Spam is when a irrelevant message is sent to many places. Wiki Article: Spam
Advertising is when you promote your studios and projects. Wiki Article: Advertising
Necroposting is when you post on a old topic. It distracts other helpers! Wiki Article: Necroposting
Derailing is when you post something that is irrelevant to the topic, like minimodding. It is called thread hijacking. Wiki Article: Derailing(Derailing idea comes from this guy),
in the process of leaving scratch.
bob has been hidden again :(
- Discussion Forums
- » Help with Scripts
- » the cloning tutorial: the basics of cloning.