Discuss Scratch

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!

Last edited by LiquidMetal (March 17, 2014 14:05:42)

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

juicykiwi wrote:

That's not I meant, but I got what I needed from Scratch Wiki. Thanks anyway!
What did it say?I am to lazy to look.

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

theobenjamin wrote:

juicykiwi wrote:

That's not I meant, but I got what I needed from Scratch Wiki. Thanks anyway!
What did it say?I am to lazy to look.
http://wiki.scratch.mit.edu/wiki/Block_Plugin/ForumHelp

I <3 clarinet!

pen down
theobenjamin
Scratcher
65 posts

Make a block-variables

juicykiwi wrote:

theobenjamin wrote:

juicykiwi wrote:

That's not I meant, but I got what I needed from Scratch Wiki. Thanks anyway!
What did it say?I am to lazy to look.
http://wiki.scratch.mit.edu/wiki/Block_Plugin/ForumHelp
Thanks

Don't know how to take a screenshot? Learn how to for Chrome Os, Mac, and Windows.
đøŋ'ţ ƒȱȑǥɛȾ ƈĥǟŗăċŧǝŗ ɱȃƥ

Powered by DjangoBB