This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-12 11:54:47

ats1080
New Scratcher
Registered: 2012-10-12
Posts: 2

Duplicate sprites with scripts

I have a game that I am working on that will multiply a sprite after a condition is met.  For example, after you kill the first one, 2 show up.  Every time you kill another one, 2 more show up.  I've been reading about 1s1s projects and cant believe there isn't an easier way to do this.  The sprites/scripts will all be the same, but multiplied on demand.  I don't want to use the show/hide feature because that will limit the game.

Offline

 

#2 2012-10-12 12:43:49

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Duplicate sprites with scripts

Scratch 2.0 will have a clone feate in which this is possible, else you will have to use show/hide.

Offline

 

#3 2012-10-12 13:50:08

ats1080
New Scratcher
Registered: 2012-10-12
Posts: 2

Re: Duplicate sprites with scripts

When is 2.0 due out?  I saw another post from 2010 talking about using the 2.0 alpha...

Offline

 

#4 2012-10-12 21:05:47

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: Duplicate sprites with scripts

ats1080 wrote:

I have a game that I am working on that will multiply a sprite after a condition is met.  For example, after you kill the first one, 2 show up.  Every time you kill another one, 2 more show up.  I've been reading about 1s1s projects and cant believe there isn't an easier way to do this.  The sprites/scripts will all be the same, but multiplied on demand.  I don't want to use the show/hide feature because that will limit the game.

Either wait for 2.0, or have a limited amount and then use separate sprites with "if's" and "show's" and "hide's".


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&action=projects&type=newest&return=image&num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&action=onlineStatus&type=text

Offline

 

#5 2012-10-12 23:11:21

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Duplicate sprites with scripts

ats1080 wrote:

When is 2.0 due out?  I saw another post from 2010 talking about using the 2.0 alpha...

The Scratch Team wants it out before next year.  smile

Offline

 

#6 2012-10-13 00:41:34

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Duplicate sprites with scripts

This can be done with lists and stamping, but with more than 10ish it gets laggy


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#7 2012-10-13 08:43:43

Martiscratch
Scratcher
Registered: 2012-05-04
Posts: 100+

Re: Duplicate sprites with scripts

stamp clear stamp clear esc


http://signaturecraft.us/signatures/eJw1yDEOgCAMBdC9p_gnICphdnA18QwoNZIAJRTD9Z184-uP74gKjxIvxi3tzaii3ZA-PjPijdgxvBpjcCYeeOtKW2Ou3OhIAbuUIOUvpdnNtDhH1tL0AQVCHgk~.png

Offline

 

#8 2012-10-13 09:08:54

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: Duplicate sprites with scripts

Martiscratch wrote:

stamp clear stamp clear esc

esc? Escape?


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#9 2012-10-13 09:42:03

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Duplicate sprites with scripts

jontmy00 wrote:

Martiscratch wrote:

stamp clear stamp clear esc

esc? Escape?

he meant et cetera
to do this, you'd have a script something like this

when gf clicked
forever
clear
set [i v] to (1)
repeat (length of [xpos v])
go to x:(item (i) of [xpos v]) y:(item (i) of [ypos v])
point in direction (item (i) of [directions v])
move (speed) steps
stamp
if <death condition>
delete (i) of [xpos v]//et al for the other lists
repeat (2)
add (starting x) to [xpos v]
add (starting y) to [ypos v]
add (starting direction) to [directions v]
end
end
change [i v] by (1)

Last edited by zammer990 (2012-10-13 09:42:30)


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

Board footer