Discuss Scratch

lundfamily3
Scratcher
100+ posts

Is this the simplest way to go to a previous costume?

Is it?

 when [left arrow v] key pressed
switch costume to ((costume #) - (1))

Last edited by lundfamily3 (Nov. 12, 2013 23:56:22)

scubajerry
Scratcher
1000+ posts

Is this the simplest way to go to a previous costume?

Yes - I believe it is.
PullJosh
Scratcher
1000+ posts

Is this the simplest way to go to a previous costume?

Yep. Switching backdrops is easier, for whatever reason, but this is it for costumes.
lafoudre
Scratcher
100+ posts

Is this the simplest way to go to a previous costume?

The add and subtract are done “modulo” the number of costumes. If you do -1 on the first costume it goes to the last one ;-)
KermitMC
Scratcher
100+ posts

Is this the simplest way to go to a previous costume?

There is an easier way yet it requires you knowing how many costumes are on the sprite.
If there are 7 costumes then make it change by 6.
Or if there is 5 costumes make it change by 4 ect.
sonicfan12p
Scratcher
1000+ posts

Is this the simplest way to go to a previous costume?

KermitMC wrote:

There is an easier way yet it requires you knowing how many costumes are on the sprite.
If there are 7 costumes then make it change by 6.
Or if there is 5 costumes make it change by 4 ect.
The script would look like this.
when [left arrow v] key pressed
repeat [4]
next costume
I don't know, that doesn't really seem easier, and it's also not future proof. If you add a costume, you have to change the number.

Last edited by sonicfan12p (Nov. 13, 2013 20:57:53)

Julianthewiki
Scratcher
100+ posts

Is this the simplest way to go to a previous costume?

Or, this:

switch costume to (join [costume]((costume #)-(1)))

Last edited by Julianthewiki (May 26, 2014 03:57:31)

Powered by DjangoBB