Discuss Scratch

CodesNorth
Scratcher
87 posts

Leopard: Edit Scratch projects as JavaScript code

Thanks!
Orange_Gumdrop
Scratcher
9 posts

Leopard: Edit Scratch projects as JavaScript code

My project doesn't convert to JavaScript because of an error:
Cannot read properties of undefined (reading ‘value’)
do you know why/when does this happen and how to fix it?
Universal_Collision
Scratcher
0 posts

Leopard: Edit Scratch projects as JavaScript code

https://scratch.mit.edu/projects/976249350/
my project wouldn't work can anyone tell me why?
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

Universal_Collision wrote:

https://scratch.mit.edu/projects/976249350/
my project wouldn't work can anyone tell me why?
Is it using any non implemented blocks?

julmik6478 wrote:

Non translated list:
when backdrop switches to [backdrop 1 v]
set drag mode [draggable v]::sensing
set drag mode [undraggable v]::sensing
([volume v] of [Sprite1 v])
(username)
(☁ cloud variables)
- extensions other than pen
N4M3IST4K3N
Scratcher
0 posts

Leopard: Edit Scratch projects as JavaScript code

Does anyone know how long it will take for a medium size scratch project to be converted? I have a scratch project with about 1,300 blocks and have been waiting for about 3 hours.
CodesNorth
Scratcher
87 posts

Leopard: Edit Scratch projects as JavaScript code

Wow. I was going to convert something with 3000+ blocks.
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

N4M3IST4K3N wrote:

Does anyone know how long it will take for a medium size scratch project to be converted? I have a scratch project with about 1,300 blocks and have been waiting for about 3 hours.
If it's loading for that wrong, something has definitely gone wrong. Maybe try the new offline conversion option.
nanalan
Scratcher
100+ posts

Leopard: Edit Scratch projects as JavaScript code

Actually one of the coolest things I've ever seen, well done Josh
Willjax
Scratcher
0 posts

Leopard: Edit Scratch projects as JavaScript code

can it also work the other way around? I mean go from JS to sb3?
dynamicsofscratch
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

Willjax wrote:

(#1031)
can it also work the other way around? I mean go from JS to sb3?
no
Veko_Studio
Scratcher
0 posts

Leopard: Edit Scratch projects as JavaScript code

why is my project not working it only has pen and is made in scratch 3.0
https://scratch.mit.edu/projects/987872461/
AdministratorX86
Scratcher
0 posts

Leopard: Edit Scratch projects as JavaScript code

https://scratch.mit.edu/projects/1025698237/
Cannot read properties of undefined (reading ‘opcode’)
Only extension used is pen.
Made in scratch 3.0
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

Translation for
when backdrop switches to [ v]
I a sprite:
new Trigger(Trigger.TIMER_GREATER_THAN, { VALUE: () => this.timer - this.stage.costume == “backdrop1” }, this.
In a stage:
new Trigger(Trigger.TIMER_GREATER_THAN, { VALUE: () => this.timer - this.costume == “backdrop1” }, this.
This in scratch blocks:
when [timer v] > ((timer) - <(backdrop name) = [stage]>
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

Translation for
when [any v] key pressed
new Trigger(Trigger.KEY_PRESSED, { key: “any” }, this.myScript)
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

I found tutorial for text to speech in javascript, so you can add support for text to speech blocks:
https://dev.to/devsmitra/convert-text-to-speech-in-javascript-using-speech-synthesis-api-223g
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

You can add support for translate blocks using google translate api.
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

Translations for
switch backdrop to [backdrop 1 v] and wait
// In a sprite:
yield* this.stage.costume = “backdrop1”;

// In the stage:
yield* this.costume = “backdrop1”;
 
switch backdrop to [next backdrop v] and wait
// In a sprite:
yield* this.stage.costumeNumber++;

// In the stage:
yield* this.costumeNumber++;
switch backdrop to [previous backdrop v] and wait
// In a sprite:
yield* this.stage.costumeNumber–;

// In the stage:
yield* this.costumeNumber–;
switch backdrop to [random backdrop v] and wait
// In a sprite:
yield* this.stage.costume = “random backdrop”;

// In the stage:
yield* this.costume = “random backdrop”;
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

Translation for color hacked block
(join [#FF6680] [])
“(Color.hsv(11, 90, 100)) + ” "
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

Translation for
([volume v] of [Sprite1 v])
Try
this.sprites.sprite1.audioEffects.volume
or
this.sprites.sprite1.volume
cs947939
Scratcher
37 posts

Leopard: Edit Scratch projects as JavaScript code

My project is not converting to JS. I've removed all blocks with no translation available and I still get this error: Cannot read properties of undefined (reading ‘name’)
Project link on scratch: https://scratch.mit.edu/projects/1030842840/

Powered by DjangoBB