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

#1 2010-07-01 04:20:00

Cyberios
Scratcher
Registered: 2010-07-01
Posts: 4

How do I make two costumes alternate?

Thanks for visiting this thread, as stated in the thread title I would like to know how to make two costumes alternate. Any help will be appreciated.  smile

Offline

 

#2 2010-07-01 07:30:17

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: How do I make two costumes alternate?

Use this

[next costume]
[switch to costume[ costume# + 1]]


Check out my projects if you have a chance.

Offline

 

#3 2010-07-01 08:01:54

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: How do I make two costumes alternate?

I would use something like this. Change as you need it

<forever>
<next costume>
<wait(  0.2 )secsc>
<switch to costume[ 1]
<wait(  0.2 )secsc>
<end>

Last edited by what-the (2010-07-01 08:02:04)


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#4 2010-07-01 10:26:42

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How do I make two costumes alternate?

Yes, what-the and climber59 have given you good scripts - use them.

The costume blocks are actually very useful.

Offline

 

#5 2010-07-01 11:25:33

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: How do I make two costumes alternate?

If there are only two costumes, you could just use next costume and leave out the second part.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#6 2010-07-01 11:40:55

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: How do I make two costumes alternate?

If there are only two costumes, or more that you want to infinitely scroll through:
http://i45.tinypic.com/351fzua.jpg

If there are more than two costumes, then you do this:
http://i45.tinypic.com/2vn2peu.gif


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#7 2010-07-01 22:50:03

Cyberios
Scratcher
Registered: 2010-07-01
Posts: 4

Re: How do I make two costumes alternate?

Wow, thanks for all the help! I will use these scripts.

Offline

 

#8 2010-07-02 11:09:01

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: How do I make two costumes alternate?

I used to split more than 2 costumes up between multiple sprites. Now I use stacked If statements to pick between costumes according to some status variable. So in a single sprite I can have 3 walking pics, 2 jumping, 2 flying, etc.


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

Board footer