Scratch Plugins


Caution.png This article or section is currently undergoing major changes by Mitopolis (talk | contribs) . Please avoid largely modifying this page's contents until this template has been removed.

Scratch Plugins are simple extensions created for Scratch to supply extra code, usually sending data via Mesh. The easiest way to make one is with a Scratch Modification, such as BYOB.

How to Code

In this example, BYOB will be used. Use this in BYOB:

when I receive [ascii for letter v]
set [ascii v] to (ascii for ([letter v] sensor value))
broadcast [ready v]

Save that as plugin.ypr. Now use this in Scratch:

when gf clicked
forever
ask [Letter:] and wait
set [letter v] to (answer)
broadcast [ascii for letter v] and wait
end
when I receive [ready v]
set [ASCII v] to ([ascii v] sensor value)

Save that as connect.sb. Now, connect BYOB and Scratch using Mesh and start connect.sb. Enter a letter. The variable (ASCII) will contain the ASCII code.

See Also

  • This page was last modified on 23 February 2016, at 21:35.