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

#1 2013-04-26 10:46:33

Imaginos
New Scratcher
Registered: 2013-03-06
Posts: 56

Variable controlled costume change?

Is there an easy way to change a sprite's costume depending on the numerical value of a variable?

I know there is a purple block named "costume #" but I can't find a way to make a command such as...

If BOB(variable) = 3 switch costume to costume#3

or

Set costume# to BOB(variable)

Offline

 

#2 2013-04-26 11:00:34

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Variable controlled costume change?

Simply drop the variable into the costume dropdown.  smile

Offline

 

#3 2013-04-26 11:08:44

Imaginos
New Scratcher
Registered: 2013-03-06
Posts: 56

Re: Variable controlled costume change?

Thanks scimonster... I never guessed that it would be something so simple. With that knowledge I can go back and make some of my older scripts far more streamline.
smile

Offline

 

#4 2013-04-26 11:41:12

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Variable controlled costume change?

You're welcome!

Offline

 

Board footer