Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a sprite go to the previous costume
- _DragonLover_
-
58 posts
How to make a sprite go to the previous costume
You could either:
or you could:
Hopefully it shows correctly.
or you could:
Hopefully it shows correctly.
Last edited by _DragonLover_ (Feb. 17, 2016 21:35:38)
- x_beast
-
49 posts
How to make a sprite go to the previous costume
well its a easy script theres 2 optoins
or you can do this, costume 1 is the current costume 2 the previous
or you can do this, costume 1 is the current costume 2 the previous
hope this helps if you want it done for you visit this linkhttps://scratch.mit.edu/discuss/topic/183792/
- RCPD93
-
86 posts
How to make a sprite go to the previous costume
Ok! Thanks. How do you close a forum discussion? And Check this forum if your interested in beta testing an online racing game! https://scratch.mit.edu/discuss/topic/183950/?page=1#post-1797351
- _DragonLover_
-
58 posts
How to make a sprite go to the previous costume
https://scratch.mit.edu/discuss/topic/183950/?page=1#post-1797351Well, I don't know how to close a discussion, but you could change the title to add (FIXED) or something like that. I think the Scratch Team will then delete the discussion. Ok! Thanks. How do you close a forum discussion? And Check this forum if your interested in beta testing an online racing game!
- SuperMarioFan4
-
100+ posts
How to make a sprite go to the previous costume
Once the topic is 24 hours old, there will be a “Close Topic” button at the bottom of the page.
- gtoal
-
1000+ posts
How to make a sprite go to the previous costume
the suggestions above are not a good general solution. Create a ‘max costume number’ variable. Do ‘next costume’ until costume# wraps back to 1. Note what the highest value was. Then you can find the previous costume by adding (number of costumes -1) MOD number of costumes (taking care to correct for 0-base of MOD and 1-base of costume numbers)
- _TigerJack21_
-
83 posts
How to make a sprite go to the previous costume
Generally, you could use:
Then, you could just drag
over to where you want to switch the costume back. Hope this helped!
- RCPD93
-
86 posts
How to make a sprite go to the previous costume
Thanks everyone, But I'm closing this forum. Thanks!
- gtoal
-
1000+ posts
How to make a sprite go to the previous costume
doesn't work if you're on the first costume Generally, you could use:Then, you could just dragover to where you want to switch the costume back. Hope this helped!
- _TigerJack21_
-
83 posts
How to make a sprite go to the previous costume
doesn't work if you're on the first costume Generally, you could use:Then, you could just dragover to where you want to switch the costume back. Hope this helped!
EDIT:
I don't think I understood this - do you want it to go to the last costume when it gets to costume 1?
Last edited by _TigerJack21_ (Feb. 18, 2016 02:00:00)
- gtoal
-
1000+ posts
How to make a sprite go to the previous costume
doesn't work if you're on the first costume Generally, you could use:Then, you could just dragover to where you want to switch the costume back. Hope this helped!EDIT:
I don't think I understood this - do you want it to go to the last costume when it gets to costume 1?
yes - thats why you add (N-1) rather than subtract 1. Using MOD reduces the larger number back into the proper range.
- _TigerJack21_
-
83 posts
How to make a sprite go to the previous costume
Oh! OK! That makes sensedoesn't work if you're on the first costume Generally, you could use:Then, you could just dragover to where you want to switch the costume back. Hope this helped!EDIT:
I don't think I understood this - do you want it to go to the last costume when it gets to costume 1?
yes - thats why you add (N-1) rather than subtract 1. Using MOD reduces the larger number back into the proper range.

- WalrusGamez
-
1 post
How to make a sprite go to the previous costume
Thank you! This was helpful!!!































- Foxboy1213
-
13 posts
How to make a sprite go to the previous costume
In scratch 3.0, the codes you are used to have won't work.
Last edited by Foxboy1213 (Nov. 13, 2020 18:05:21)
- Discussion Forums
- » Help with Scripts
-
» How to make a sprite go to the previous costume