Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
- thecoolgguy2013
- Scratcher
3 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Look below Wow, awesome! I don't know any JavaScript so I'm using this to help me learn a bit. Quick question though, how would you make an “if on edge, bounce” function because I kind of need it.
Last edited by thecoolgguy2013 (Feb. 25, 2024 23:14:46)
- thecoolgguy2013
- Scratcher
3 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
DO this Script
if (/* this.touching(“edge”) */) {
//bounce (maybe)
I hope this helped and I don't know as much so sorry if it doesn't work
if (/* this.touching(“edge”) */) {
//bounce (maybe)
I hope this helped and I don't know as much so sorry if it doesn't work
- BOMZIKA22
- Scratcher
10 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Scratch is the best thing ever!!
hi @griffpatch i am a scratcher and i love your videos
- DARKGAMES1951
- Scratcher
17 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Mine wont convert, it keeps saying "Cannot read properties of undefined (reading ‘name’)"
- A_Nyan_In_Space
- Scratcher
100+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Error:Project: https://scratch.mit.edu/projects/855232789/
There was an error converting your project.
Error occurred during query execution: ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: “ERROR”, parsed_severity: Some(Error), code: SqlState(E42P05), message: “prepared statement \”s0\“ already exists”, detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some(“prepare.c”), line: Some(446), routine: Some(“StorePreparedStatement”) }) }) })
Leopard only supports new projects (created in Scratch 3.0). And the only supported extension is “pen”; all others will fail.
If you aren't sure why your project is failing, ask on the forums!
- s_federici
- Scratcher
500+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Why is project https://scratch.mit.edu/projects/706643027/ failing?
- swzler
- Scratcher
14 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Cannot read properties of undefined (reading ‘name’)"yeah Mine wont convert, it keeps saying "
-swzler
- Gaty1101
- Scratcher
7 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
here's my if on edge bounce block replacement
if (this.y > 180 || this.y < -180 || this.x > 240 || this.x < -240) {
this.direction += 180;
if (this.y > 180 || this.y < -180 || this.x > 240 || this.x < -240) {
this.direction += 180;
- Pillagerplayz
- Scratcher
55 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Why does it not support extensions other than pen! Scratch was coded with JavaScript! The extensions were coded with JavaScript!
- PullJosh
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Fun news! Thanks to some hard work from HanClinto, towerofnix, and adroitwhiz, we now support the “if on edge, bounce” block!
This completes our support for the Scratch “motion” category! All motion blocks are now supported in Leopard.
if on edge, bounce
This completes our support for the Scratch “motion” category! All motion blocks are now supported in Leopard.
- alwayspaytaxes
- Scratcher
100+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Fun news! Thanks to some hard work from HanClinto, towerofnix, and adroitwhiz, we now support the “if on edge, bounce” block!Great job keeping this project active for all these years!if on edge, bounce
This completes our support for the Scratch “motion” category! All motion blocks are now supported in Leopard.
Scratch uses a JavaScript library called the Scratch VM. Extensions in Scratch are written to work with the Scratch VM. Leopard does not use the Scratch VM, at least to my knowledge Why does it not support extensions other than pen! Scratch was coded with JavaScript! The extensions were coded with JavaScript!
-\{:)_/-
play sound [bad to the bone riff.wav v]
- poptko
- Scratcher
78 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
I am trying to load a Scrolling Platformer Engine made by @griffpatch but it says a error
- T33n_T1t4n5
- Scratcher
24 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
@griffpatch but it says a errorsame here. it doesn't give me an error but it stays stuck on the loading swirly when I upload the project file I am trying to load a Scrolling Platformer Engine made by
- Jaim_animation
- Scratcher
77 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
GUYS STOP REPORTING THE SAME ERROR LEOPARD TEAM KNOWS IT!
Hope It Helps!
—-Hi! I Am Jaim, A 9 Years Old Bangladeshi Boy! I like To Code In Javascript,HTML, Css Aaand Scratch!—
I Like To Make Appel Levels!
My Appel Level Collections-
Desert Appel Collection
scratch blue infection! try to prevent it, but how?
- Brickwall777
- Scratcher
55 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Leopard.js won't upload my project. It was made in 3.0, last week in fact. No idea what's wrong.
https://scratch.mit.edu/projects/977649640/
https://scratch.mit.edu/projects/977649640/
- gdxfor
- Scratcher
100+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
It's because there's no support for the "stop [other scripts in sprite v]" block Leopard.js won't upload my project. It was made in 3.0, last week in fact. No idea what's wrong.
https://scratch.mit.edu/projects/977649640/
Last edited by gdxfor (March 11, 2024 23:51:24)
- betazone
- New to Scratch
3 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Followed your examples on the sb-edit github page. Was able to get code from .sb3 file using your call to project.toLeopard({ printWidth: 100 }).
Looking at the code for the toLeopard function, looks like there are options for extracting costumes, backdrops and sounds.
Is that possible and if so, how would I set the options for the call to toLeopard to do it?
Looking at the code for the toLeopard function, looks like there are options for extracting costumes, backdrops and sounds.
Is that possible and if so, how would I set the options for the call to toLeopard to do it?
- PullJosh
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
What do you mean by “extracting” costumes, backdrops, and sounds? Followed your examples on the sb-edit github page. Was able to get code from .sb3 file using your call to project.toLeopard({ printWidth: 100 }).
Looking at the code for the toLeopard function, looks like there are options for extracting costumes, backdrops and sounds.
Is that possible and if so, how would I set the options for the call to toLeopard to do it?
- CoderCat322
- Scratcher
12 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
It says sometimes it messes up converting when your game uses pen. Is this true?
- PullJosh
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Pen blocks shouldn't cause an issue. Other extensions might be a problem, but pen is fully supported. Are you seeing any pen-related errors when you try to convert your project? It says sometimes it messes up converting when your game uses pen. Is this true?
- Discussion Forums
- » Advanced Topics
- » Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!