First, download the Scratch Source Code, or hack your copy of 1.4. (If you don't have 1.4, download the source code.)
Shift-click the loop in the "R" in the Scratch Logo.
Select "Turn Fill-screen off."
Click on the gray...
Select open from the menu that pops up...
Then browser.
Our Squeak programming goes in here.
First, follow this path:
Scratch-Objects,
ScratchSpriteMorph,
block specs,
blockspecs.
Then, find the "next costume" in the "looks" category.
Put beside it:
('previous costume' #- #prevCostume)Right-click...
...and accept.
If it asks for you initials, type them in. (Or, if you want, type in Blah, blah blah.)
Now you have the block!
But...it doesn't work.
We need to call a function.
Switch to the "instance" side.
Then, follow this path:
ScriptableScratchMorph,
looks ops.
Then, type in
prevCostume
self costumeIndex: self costumeIndex - 1You are done! The block works now!
Offline
Are you using 1.3 or 1.4, midnightleopard?
nXIII, doesn't this look prettier than switch to costume costume-1?
Offline
somelia wrote:
Are you using 1.3 or 1.4, midnightleopard?
nXIII, doesn't this look prettier than switch to costume costume-1?
Not really.
Anyone who really needs this could use BYOB.
Offline
True, but...i just felt like making this.
Offline
nXIII wrote:
This is a pretty pointless block. Just use 'switch to costume [costume # - 1]'. Do you really need THAT block to be a couple milliseconds faster? Reverse the order of the costumes!
I think it's a great block - I've often wished we had one, just for the symmetry. And the instructions are so clearly written...I might even give it a try myself!
Thanks for taking the time to write this up so clearly and share it with us. That's what makes Scratch such a great community - people willing to share their interests
Offline
Interesting, but It really isn't hacking. It's just modding the software. Great job finding how to do it.
Offline
nXIII wrote:
This is a pretty pointless block. Just use 'switch to costume [costume # - 1]'. Do you really need THAT block to be a couple milliseconds faster? Reverse the order of the costumes!
You'd probably think we only need 1 "rotate X degrees" too.
But some users might not be able to figure that out by themselves, so adding it might be good...
Offline
somelia wrote:
Are you using 1.3 or 1.4, midnightleopard?
nXIII, doesn't this look prettier than switch to costume costume-1?
1.4
Offline
Did you shift-click the loop in the "r"?
Offline
somelia wrote:
Did you shift-click the loop in the "r"?
you betcha
Offline
somelia wrote:
First, download the Scratch Source Code, or hack your copy of 1.4. (If you don't have 1.4, download the source code.)
Shift-click the loop in the "R" in the Scratch Logo.
Select "Turn Fill-screen off."
Click on the gray...
Select open from the menu that pops up...
Then browser.
Our Squeak programming goes in here.
First, follow this path:
Scratch-Objects,
ScratchSpriteMorph,
block specs,
blockspecs.
Then, find the "next costume" in the "looks" category.
Put beside it:Code:
('previous costume' #- #prevCostume)Right-click...
...and accept.
If it asks for you initials, type them in. (Or, if you want, type in Blah, blah blah.)
Now you have the block!
But...it doesn't work.
We need to call a function.
Switch to the "instance" side.
Then, follow this path:
ScriptableScratchMorph,
looks ops.
Then, type inCode:
prevCostume self costumeIndex: self costumeIndex - 1You are done! The block works now!
It broke my scratch can't access look's
Offline
jamopop wrote:
somelia wrote:
First, download the Scratch Source Code, or hack your copy of 1.4. (If you don't have 1.4, download the source code.)
Shift-click the loop in the "R" in the Scratch Logo.
Select "Turn Fill-screen off."
Click on the gray...
Select open from the menu that pops up...
Then browser.
Our Squeak programming goes in here.
First, follow this path:
Scratch-Objects,
ScratchSpriteMorph,
block specs,
blockspecs.
Then, find the "next costume" in the "looks" category.
Put beside it:Code:
('previous costume' #- #prevCostume)Right-click...
...and accept.
If it asks for you initials, type them in. (Or, if you want, type in Blah, blah blah.)
Now you have the block!
But...it doesn't work.
We need to call a function.
Switch to the "instance" side.
Then, follow this path:
ScriptableScratchMorph,
looks ops.
Then, type inCode:
prevCostume self costumeIndex: self costumeIndex - 1You are done! The block works now!
It broke my scratch can't access look's
Be sure to follow the tutorial carefully. Re-install Scratch, and then try it again. Tell me if anything happens.
My Scratch broke when I activated Mesh, then I realized I had made a tiny mistake.
Offline
guess what. replace the
'previous costume' #- #prevCostume)
previous costume with whatever you want. I put in lalala five, followed the other steps, and the block is called lalala five, but it carries out the previous costume function.
Offline
laser100 wrote:
guess what. replace the
'previous costume' #- #prevCostume)
previous costume with whatever you want. I put in lalala five, followed the other steps, and the block is called lalala five, but it carries out the previous costume function.
![]()
Ya, cause 'previous costume' is just the label
incredible to play around with isn't it
Try renaming ALL of your blocks ::::::
Offline
How do you save the block? When I exit Scratch, it vanishes and I have to make it all over again. Can you help?
Offline
Nevermind, I figured out how.
Offline
This Is A Great Tutorial! It's Really Simple To Make, But It's Very Good. Good Job!
Offline
TheGameMaster1231 wrote:
This Is A Great Tutorial! It's Really Simple To Make, But It's Very Good. Good Job!
![]()
Thank you!
Offline