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

#1 2009-07-02 23:52:06

rbolsius
Scratcher
Registered: 2008-06-16
Posts: 41

Switching Costume to a Variable

<set{ costume }to( costume3
<switch to costume[ <{ costume }>

This script used to work in the 1.4 Release Candidate. In the final release of 1.4 it no longer works. I was wondering if this is a bug.

I was using a join block to construct a costume name and then switch the costume of the sprite to that variable. It was very useful but it doesn't work in the 1.4 final release.

Offline

 

#2 2009-07-03 09:07:08

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Switching Costume to a Variable

Interesting...it seems to still work if you set the variable to a costume number.  It also seems to work if the costume name does not contain a number (is just text).  But it doesn't work with a costume name that is mixed text and numbers.  Odd!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2009-07-03 11:03:39

rbolsius
Scratcher
Registered: 2008-06-16
Posts: 41

Re: Switching Costume to a Variable

You're right! I just tried it. Very odd. I wonder why it worked in the release candidate.

Offline

 

#4 2009-10-25 17:46:27

pescador_bob
Scratcher
Registered: 2009-09-19
Posts: 1

Re: Switching Costume to a Variable

I had the same problem.  When I set the costume to the costume name, e.g. 'a' then it worked many of the times, but once in a while, it would ignore me.  Annoying.  so now I have to back index it to the costume number.

Offline

 

Board footer