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

#1 2010-02-04 12:33:05

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

Costume and costume#

With the new word manipulation from 1.4, I think it's about time that we separated costume and costume number.

Costume is the name of the sprite's animation frame. <switch to costume[ <{ idle }>


Would make the animation frame automatically change to the frame called "idle", whatever number that is.


Costume# is the number of the animation frame in the list of costumes (animation frames) shown in the costume tab.

Normally, this is simple and there won't be problems.
But what if there was a sprite with a costume called "1" which is the second costume, and "2", which is the first costume?

Would:
<set{ generic variable }to( 1
<switch to costume[ <{ generic variable }>


Make the sprite switch to the costume called "1" or the costume called "2"?


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

 

#2 2010-02-04 12:36:20

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Costume and costume#

The solution is to not call a costume "1".

Offline

 

#3 2010-02-04 12:51:04

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

Re: Costume and costume#

That was a very simple example. There are some times when it can be complicated.


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

 

#4 2010-02-05 10:04:41

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Costume and costume#

No, if you use a variable like that, it will only do the frame number.
Though i would like it to look for the name though. if thats possible, maybe add in extra thing in the sensors like you have costume# maybe costume-name?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#5 2010-02-06 01:22:24

Keani
Scratcher
Registered: 2009-08-15
Posts: 39

Re: Costume and costume#

This would be somewhat helpful


http://internetometer.com/image/9932.png

Offline

 

#6 2010-02-06 13:12:16

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Costume and costume#

Keani wrote:

This would be somewhat helpful

Kind of.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

Board footer