Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Cloning vs. stamping
- emd245
- Scratcher
78 posts
Cloning vs. stamping
What is the difference between the blocks {create clone of (myself v) } and {stamp}? It is so confusing. I also don't know whether to use cloning or stamping.
Last edited by emd245 (Aug. 8, 2013 00:35:38)
About me
Registered: (mm/dd/yyyy) 07-07-2013
Scratcher
BEST QUOTE BY FAR: “No wristbands can make one.”
Best project worth checkin' out: //scratch.mit.edu/projects/12152860/
I wish there was an bbcode tag
- drmcw
- Scratcher
1000+ posts
Cloning vs. stamping
They are very different. Stamp just leaves an image of the sprite on the stage at it's current position however a clone is a bit like duplicating the sprite and so it can be controlled via scripts.
- turkey3
- Scratcher
1000+ posts
Cloning vs. stamping
A clone is an actual character. It can perform actions and do just about everything a sprite can. Clones get deleted when a project starts and stops. Stamps, on the other hand, cannot perform actions. It is simply the image of the sprite displayed on the stage. It is not an actual object, but is just the pen marks that make up the sprite's visual appearance. Imagine a real stamp. You can stamp it, but afterwards it does nothing else but stays there for you to look at.
- footsocktoe
- Scratcher
1000+ posts
Cloning vs. stamping
Does 10 clones of one sprite have every single ability that 11 different sprites would have? Is there any drawback at all to using clones other than they all look like each other?
SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!
- drmcw
- Scratcher
1000+ posts
Cloning vs. stamping
Does 10 clones of one sprite have every single ability that 11 different sprites would have? Is there any drawback at all to using clones other than they all look like each other?
Although you can use any block with a clone not all will work as you may expect. The clone's scripts are started with the when I start as a clone hat block and the clones may also receive broadcasts. What is frustrating is that if you use reporter blocks such as y position, x position, costume# etc then you won't get the values for the clone but the parent sprites values. This limitation can be overcome though by creating a variable for that sprite only, these variable values are then unique for each clone and can be used to store typical reporter values.
Clones means a copy so they get all the parents costumes too so they don't have to look like each other as they can change costume.
- liam48D
- Scratcher
1000+ posts
Cloning vs. stamping
It really depends on what you use clones/stamps for. As far as I know, there is only a limited number of clones. But stamps are unlimited. Stamps are very good for a text creator thing which does not use any clones. Clones are, like turkey3 said, objects with all the same things as the sprite it is a clone of. Speaking of clones, did you know that scientists once cloned a cat in real life?
202e-202e-202e-202e-202e UNI-CODE~~~~~
- PERCE-NEIGE
- Scratcher
100+ posts
Cloning vs. stamping
What is frustrating is that if you use reporter blocks such as y position, x position, costume# etc then you won't get the values for the clone but the parent sprites values.
But you can define the exact position of a clone by adding its coordinate in a list as soon it has been created.
Set a variable to count the clones, you may name it clone_counter by ex.
Script:
NB: I comment with the sign # before the comment.
Set clone_counter to 0
Create list “position x of the clones”
Create list “position y of the clones”
Clone myself—> into clone1, clone2, clone3,… clone10 # I created 10 clones here.
Increase clone_counter by 1 # So, each time I create a clone, the counter increase, I know how many clone are remaining to be create by ex.
When I start as a clone…. #(it is the message that make the clones you created with “clone myself” do an action.
add …. to x
Add x to “position x of the clones” list.
Add y to “position y of the clones” list. # Each one of the clones will write their x and y in the list, as soon as they are called to do something by the “when I start as clone”-script.
Delete this clone # The command to erase clones, you can do erase all in the pen section too.
If you stamp, the stamps can't move, delete itself (unless you delete all the pen actions), do an action, etc.
but stamping is limitless, you have a number limit of clones. (but it's a big limit)
The third solution, would be to create as many sprites as you need items, almost the same than cloning, but each sprites are independant, you can't program common behaviour as in cloning.
- scubajerry
- Scratcher
1000+ posts
Cloning vs. stamping
I implemented the game Solitiare with 1 sprite, totally using stamping. The 1 spirte would move to where it needed to to either stamp, over stamp, or erase a previous stamp.
http://scratch.mit.edu/projects/2997716/
I recently reimplemented with 1 sprite, totally using cloning. Here, there are 52 clones, each doing what they need to do.
http://scratch.mit.edu/projects/11307926/
Many project can be done either way, but I can tell you the cloning was a lot more intuitive for me.
http://scratch.mit.edu/projects/2997716/
I recently reimplemented with 1 sprite, totally using cloning. Here, there are 52 clones, each doing what they need to do.
http://scratch.mit.edu/projects/11307926/
Many project can be done either way, but I can tell you the cloning was a lot more intuitive for me.
- -sunsetsky
- Scratcher
5 posts
Cloning vs. stamping
Clones are a copy of the sprite can be coded, but the clone limit is only 300. Clones delete when the project is rerun. A stamp is just an image of the sprite that can't be coded. There is no limit to how many stamps you can make. Stamps don't delete when you rerun a project, unless you use this script:
I like using clones when making something that needs code, like a mouse trail. I use stamps when I want to make a permanent trail and I don't want a limit to how many copies of the sprite I can make.
when green flag clicked
clear
I like using clones when making something that needs code, like a mouse trail. I use stamps when I want to make a permanent trail and I don't want a limit to how many copies of the sprite I can make.
- -sunsetsky
- Scratcher
5 posts
Cloning vs. stamping
lol I'm the only person who's posted here since 2013
- TheAnomalousPseudo
- Scratcher
1000+ posts
Cloning vs. stamping
Yes…also know as a necropost. This issue has been resolved or forgotten for eight years now. If you want to help people, find a fresh topic with an unanswered question. lol I'm the only person who's posted here since 2013
We ought to be careful with that octopus that takes over the servers. He's well armed.
- TimeKidQuan
- Scratcher
4 posts
Cloning vs. stamping
Guys, can I ask? How do we make the normal sprites interact with the cloned ones? I'm making a platformer game and having a problem with the player not stopping to fall down when touching the cloned platforms. Here is the link if you want to check: https://scratch.mit.edu/projects/607748117/. The problem is in the boss fight.
- dj_greener
- Scratcher
100+ posts
Cloning vs. stamping
create clone of [ v]
when I start as a clone
stamp
x :: hat
- TimeKidQuan
- Scratcher
4 posts
Cloning vs. stamping
wdym?
Last edited by TimeKidQuan (Dec. 5, 2021 12:40:53)
- cIoudyness
- Scratcher
500+ posts
Cloning vs. stamping
let’s not necropost. this is a topic from 2013 that was resolved many years ago so there’s no point posting on it and bringing it back to the front page but does clones cause more lag than stamping?
and by the way yes clones probably cause more lag. they can run their own scripts, have their own copies of variables and lists, can be detected to be touching, plus they’re rendered perfectly rather than pen stamping which is a bit more low-quality pixely
brownies and kittens and all such nice things
- Mechanical_coding
- Scratcher
44 posts
Cloning vs. stamping
it all depends on what you are using it for:
if you need enemies or particles, I would use clones, but if you have a background, or tile scrolling, I would use the pen
if you need enemies or particles, I would use clones, but if you have a background, or tile scrolling, I would use the pen
- RAD213
- Scratcher
100+ posts
Cloning vs. stamping
Please don't necropost as it clogs up topics on this forum. You can find what necroposting is here: https://en.scratch-wiki.info/wiki/Necropost
- Discussion Forums
- » Help with Scripts
- » Cloning vs. stamping