Discuss Scratch

kakaggarwal
Scratcher
1 post

How Can i use a Sprite more than once in the same stage ?

I want to use a sprite more than once in the game i am building. I tried to find some option such as copy sprite or anything else like that, but couldn't. Any help regarding this would be appreciated. This way i would be able to considerably reduce the number of code lines.
777atscratch
Scratcher
100+ posts

How Can i use a Sprite more than once in the same stage ?

Hi!
You could use clones:
whenclickedsetIDto0repeat5changeIDby1whenIstartasacloneforeverifID=1thenScriptingifID=2thenScriptingifID=3thenScriptingifID=4thenScriptingifID=5thenScripting
Clones could be clicked, but it needs some more programming.

OR

You could copy sprites by:

1. Select the sprite.
2. Right-click the sprite.
3. A menu will come. Press Duplicate and the sprite is copied!

This is my scripting skills.

Last edited by 777atscratch (Jan. 6, 2014 06:38:34)

scubajerry
Scratcher
1000+ posts

How Can i use a Sprite more than once in the same stage ?

Fixed, as I think you left out the most important line. I also changed it slightly to make ID work a little better.

777atscratch wrote:

Hi!
You could use clones:
whenclickedsetIDto0ID need to be a FOR THIS SPRITE ONLY variablerepeat5changeIDby1createcloneofmyselfsetIDto0So you tell the original from a clone. It comes in handy if responding to broadcasts.whenIstartasacloneforeverifID=1thenScriptingifID=2thenScriptingifID=3thenScriptingifmyID=4thenScriptingifID=5thenScripting
Clones could be clicked, but it needs some more programming.

OR

You could copy sprites by:

1. Select the sprite.
2. Right-click the sprite.
3. A menu will come. Press Duplicate and the sprite is copied!

This is my scripting skills.

Last edited by scubajerry (Jan. 6, 2014 08:44:33)

Powered by DjangoBB