[BETA] Pixel Art to Hopscotch JSON

JSON is a programming language I think.
Not a person.

2 Likes

Uhh… yes. JSON is the language which HS stores your code in. Jason is a male name. :man_facepalming:

2 Likes

Who said it was a person?

It stands for Java Script Object Notation, in case you were curious

4 Likes

Idk who said it was a person.

1 Like

uhh yeah thats the thing i dont really understand hopscotch json so i did this in a really weird way (someone explain to please i spent like an hour trying to figure out what’s going on)

so basically i actually write the code of the custom blocks in hopscotch, not in json, and then i place the 3 blocks in a text object, and export the project to my computer. from there i find where the 3 blocks are in the json, which are just in an array and copy and paste the 3 blocks into variables. then i just go through a for loop of the grid, pushing the appropriate object/variable (the black and white blocks) to a temp variable, and push a pos block every 16 cycles. then i literally just replace the 3 blocks in the json with the generated array.

reading back through that it makes no sense but ive already rewrote it like twice and i cbb rewriting it so i hope it makes sense lol (and thats why ive been typing for so long, im rly bad at explaining things)

2 Likes

(I’m terrible at explaining things too. :smile:)
Thanks for the explanation! I’ll try and work it out.

1 Like

so basically what im saying is, without a complete overhaul of the code, you cant really make clones or colors. however if you import the code into hopscotch, since all this is just predefined custom blocks, you can edit the custom blocks inside of hopscotch to make square pixels (‘black’ block is to make a black pixel, ‘white’ block is to make a white pixel and ‘pos’ block is to reset the position back to the left side), i was just lazy heh

i’ll work on colours and clones once i can be bothered haha (i love having motivation to do things ;-;)

2 Likes

In the abilities array, find the one that has an ability id equal to block.controlScript.abilityID

2 Likes