Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Make a block-variables
- juicykiwi
- Scratcher
86 posts
Make a block-variables
Hi! I've seen blocks that people have made with a little purple variable in them that you can change. How do you make that?
I <3 clarinet!
pen down
- LiquidMetal
- Scratcher
100+ posts
Make a block-variables
It's a bit complicated, but you can try:
1) Download a project with a custom block with at least one argument, be it a string, number, etc;…, and a set variable block
2) Rename .sb2 to .zip
3) Decompress the file and open the enclosed ‘project.json’
4) Search for “procDef”
5) Find the %s, %n or anything corresponding to an input slot. (See nXIII's spreadsheet)
6) Replace the “%s” with %m.var to get a dropdown list of variables.
Optionally, change the default value with the next list of stuff after the next end bracket “]”.
7) Save the project.json, repack the .zip file, and import it into scratch.
Hope this helps!
1) Download a project with a custom block with at least one argument, be it a string, number, etc;…, and a set variable block
2) Rename .sb2 to .zip
3) Decompress the file and open the enclosed ‘project.json’
4) Search for “procDef”
5) Find the %s, %n or anything corresponding to an input slot. (See nXIII's spreadsheet)
6) Replace the “%s” with %m.var to get a dropdown list of variables.
Optionally, change the default value with the next list of stuff after the next end bracket “]”.
7) Save the project.json, repack the .zip file, and import it into scratch.
Hope this helps!
Last edited by LiquidMetal (March 17, 2014 14:05:42)
Multidimensional Lists v2.0 || Sokoban Ultimate v1.0
Perfect Health Bars (stamping/costume) | 1s1s Onscreen Keyboard | Infinite Background Scrolling | Have a website?
- juicykiwi
- Scratcher
86 posts
Make a block-variables
That's not I meant, but I got what I needed from Scratch Wiki. Thanks anyway!
I <3 clarinet!
pen down
- theobenjamin
- Scratcher
65 posts
Make a block-variables
What did it say?I am to lazy to look. That's not I meant, but I got what I needed from Scratch Wiki. Thanks anyway!
Don't know how to take a screenshot? Learn how to for Chrome Os, Mac, and Windows.
đøŋ'ţ ƒȱȑǥɛȾ ƈĥǟŗăċŧǝŗ ɱȃƥ
- juicykiwi
- Scratcher
86 posts
Make a block-variables
http://wiki.scratch.mit.edu/wiki/Block_Plugin/ForumHelpWhat did it say?I am to lazy to look. That's not I meant, but I got what I needed from Scratch Wiki. Thanks anyway!
I <3 clarinet!
pen down
- theobenjamin
- Scratcher
65 posts
Make a block-variables
Thankshttp://wiki.scratch.mit.edu/wiki/Block_Plugin/ForumHelpWhat did it say?I am to lazy to look. That's not I meant, but I got what I needed from Scratch Wiki. Thanks anyway!
Don't know how to take a screenshot? Learn how to for Chrome Os, Mac, and Windows.
đøŋ'ţ ƒȱȑǥɛȾ ƈĥǟŗăċŧǝŗ ɱȃƥ
- Discussion Forums
- » Help with Scripts
- » Make a block-variables