Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Creating extensions for Scratch 3.0
- ILikeScratch0-0-0-1
-
Scratcher
27 posts
Creating extensions for Scratch 3.0
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; // functions ext.runJs = function(stuff) { document.body.innerHTML += '<script>' + stuff + '</script>'; } ext.a = function(stuff) { alert(stuff); } ext.pr = function(stuff, de) { window.promptMessage = window.prompt(stuff, de); } ext.an = function() { return window.promptMessage; } // Block and block menu descriptions var descriptor = { blocks: [ ['', 'run JavaScript %s', 'runJs', 'console.log("hello world!");'], ['', 'alert %s', 'a', 'message1'], ['', 'prompt %s with default message %s', 'pr', 'hello world!'], ['r', 'prompt answer', 'an'] ] }; // Register the extension ScratchExtensions.register('JavaScript', descriptor, ext); })({});
run JavaScript [console.log("hello world!");] ::extension
alert [message1] ::extension
prompt [hello world!] with default message [] ::extension
prompt answer :: extension reporter- pedrodrocafranco
-
Scratcher
500+ posts
Creating extensions for Scratch 3.0
Outputs:(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; // functions ext.runJs = function(stuff) { document.body.innerHTML += '<script>' + stuff + '</script>'; } ext.a = function(stuff) { alert(stuff); } ext.pr = function(stuff, de) { window.promptMessage = window.prompt(stuff, de); } ext.an = function() { return window.promptMessage; } // Block and block menu descriptions var descriptor = { blocks: [ ['', 'run JavaScript %s', 'runJs', 'console.log("hello world!");'], ['', 'alert %s', 'a', 'message1'], ['', 'prompt %s with default message %s', 'pr', 'hello world!'], ['r', 'prompt answer', 'an'] ] }; // Register the extension ScratchExtensions.register('JavaScript', descriptor, ext); })({});run JavaScript [console.log("hello world!");] ::extension
alert [message1] ::extension
prompt [hello world!] with default message [] ::extension
prompt answer :: extension reporter[/quote]
cool javascript extesion
- JackVideos
-
Scratcher
42 posts
Creating extensions for Scratch 3.0
I think I need an MLG Voice for Scratch!thats is a mad extesion -1 votewhen green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)
what!?!?
- JackVideos
-
Scratcher
42 posts
Creating extensions for Scratch 3.0
I got crazy ideas again
when green flag clicked
auto lip-sync with audio [test.wav v] and with instance name [alligator]-mouth
- Cutiepieofme
-
Scratcher
60 posts
Creating extensions for Scratch 3.0
I got crazy ideas againThis one's nice! +100 votes!!when green flag clicked
auto lip-sync with audio [test.wav v] and with instance name [alligator]-mouth
Last edited by Cutiepieofme (Oct. 24, 2020 06:19:15)
- Cutiepieofme
-
Scratcher
60 posts
Creating extensions for Scratch 3.0
helloHello!
This is where we find exetension ideas for scratch 3.0!
- pedrodrocafranco
-
Scratcher
500+ posts
Creating extensions for Scratch 3.0
gigaboard extesion
when green flag clicked
if <[pins v] sensor value is (...)::pen> then
wait until <when [button pressed v]?::pen>
set pin comns to [pin contacted object v]::pen
end
Last edited by pedrodrocafranco (Oct. 24, 2020 16:52:11)
- Cutiepieofme
-
Scratcher
60 posts
Creating extensions for Scratch 3.0
gigaboard extesionNice! But what's comns?when green flag clicked
if <[pins v] sensor value is (...)::pen> then
wait until <when [button pressed v]?::pen>
set pin comns to [pin contacted object v]::pen
end
- pedrodrocafranco
-
Scratcher
500+ posts
Creating extensions for Scratch 3.0
if touched a banna,apple,pineapple or a toy!gigaboard extesionNice! But what's comns?when green flag clicked
if <[pins v] sensor value is (...)::pen> then
wait until <when [button pressed v]?::pen>
set pin comns to [pin contacted object v]::pen
end
- Cutiepieofme
-
Scratcher
60 posts
Creating extensions for Scratch 3.0
Oh, okay!if touched a banna,apple,pineapple or a toy!gigaboard extesionNice! But what's comns?when green flag clicked
if <[pins v] sensor value is (...)::pen> then
wait until <when [button pressed v]?::pen>
set pin comns to [pin contacted object v]::pen
end
- pedrodrocafranco
-
Scratcher
500+ posts
Creating extensions for Scratch 3.0
my final idea extesion called : intel control and soundwaves
has 1 repoter 4 booleans 2 stack blocks
has 1 repoter 4 booleans 2 stack blocks
when green flag clicked
if a value is (10)?::pen
play a soundtrack of [relaxing v]::pen
if <[relaxing v] sound track playing?::pen> then
say ([soundtracks v] value::pen) for (2) secs
wait until <every value is (pick random (0) to (10))::pen>
wait until <pin number::pen>
wait until <a pin is touching on a[banana v]::pen>
stop [all v]
end
- TheNothingBird
-
Scratcher
100+ posts
Creating extensions for Scratch 3.0
I think I need an MLG Voice for Scratch!when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)
support.
- Cutiepieofme
-
Scratcher
60 posts
Creating extensions for Scratch 3.0
Supporttt +1 voteI think I need an MLG Voice for Scratch!when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)
support.
Last edited by Cutiepieofme (Oct. 28, 2020 13:38:13)
- pedrodrocafranco
-
Scratcher
500+ posts
Creating extensions for Scratch 3.0
I think I need an MLG Voice for Scratch!when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)
support.
this thing is bad for everyone thats bad -1000000000000000000000000000000000000000000000000000 voteSupporttt +1 voteI think I need an MLG Voice for Scratch!when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)
support.
- pedrodrocafranco
-
Scratcher
500+ posts
Creating extensions for Scratch 3.0
this is a a sprite is import a obsulete blocks note is not a extesion
when green flag clicked
if <(abs (10)) > [1]> then
say [in not]
say nothing
stamp
stamp transpararent (20)
stop all (::obsulete)::cap
end
- pedrodrocafranco
-
Scratcher
500+ posts
Creating extensions for Scratch 3.0
this is another ideas is called : scratchVR
is a 3D extesions!
blocks
is a 3D extesions!
blocks
when green flag clicked
start 3D reactions::pen
3D ballon text [helloworld3D!]::pen
if <movie time::pen> then
start movie for (120)secs::pen
end
stop movie::pen
stop 3D reactions:: pen cap
Last edited by pedrodrocafranco (Nov. 3, 2020 19:20:14)
- DabDatBass
-
Scratcher
1000+ posts
Creating extensions for Scratch 3.0
How to make extensions using repl.it?









