Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Leopard: Edit Scratch projects as JavaScript code
- CakeConsumer
-
5 posts
Leopard: Edit Scratch projects as JavaScript code
?????????????????????
when green flag clicked
say [???????????????????????//] for (2) secs
say [Question Mark]
- cppappdeveloper
-
4 posts
Leopard: Edit Scratch projects as JavaScript code
hey, the while loop works in leopard
code for while loop:
while (this.stage.vars.myVariable == 50) {
this.say(“the while loop is here! see inside! ”);
yield;
}
code for while loop:
while (this.stage.vars.myVariable == 50) {
this.say(“the while loop is here! see inside! ”);
yield;
}
- hacktronics
-
100+ posts
Leopard: Edit Scratch projects as JavaScript code
Amazing, could you separate the user script in a separate file with simple code for easier editing, I mean the base classes, and plumbing code should be in some other file. The user script should have simple code like:
*whenGreenFlagClicked() {
while (true) {
this.move(10);
yield* this.wait(1);
this.say(“Hello!”);
yield;
}
}
*whenGreenFlagClicked() {
while (true) {
this.move(10);
yield* this.wait(1);
this.say(“Hello!”);
yield;
}
}
- Forza876
-
1 post
Leopard: Edit Scratch projects as JavaScript code
How can I use Leopard on sb3 files?
- _SNIPR-
-
37 posts
Leopard: Edit Scratch projects as JavaScript code
Not too sure How can I use Leopard on sb3 files?
- ssvbxx2
-
100+ posts
Leopard: Edit Scratch projects as JavaScript code
There's a bug with the LeopardJS converter. If you set a variable to an empty value, it is converted to zero. I first saw it in this project I made: https://scratch.mit.edu/projects/647292972
- CakeConsumer
-
5 posts
Leopard: Edit Scratch projects as JavaScript code
?????????????????????
- comunicazione
-
15 posts
Leopard: Edit Scratch projects as JavaScript code
Projects now run at 30fps by default (the same as Scratch)!
You can still opt-in to 60fps by changing the frameRate option in index.js.
This will ensure that more projects run the same way they do on Scratch. And if you prefer a smoother project, it's easy to make that change yourself!
(This update was not as challenging as I expected.)
I don't see this option in my index.js at https://codesandbox.io/s/e6l7ud?file=/index.js:19-21&resolutionWidth=500&resolutionHeight=400. Am I supposed to add it?
- comunicazione
-
15 posts
Leopard: Edit Scratch projects as JavaScript code
Sprite layering blocks are now supported in Leopard!
That's right! Go to front/back and go forward/backward work now!
As the layering of the sprites of my project https://scratch.mit.edu/projects/649107588/ is different in Leopard I added a “go to front” block to the a3 sprite, but I just found a
/* TODO: Implement looks_gotofrontback */ null;
in the js code. Have I to change this to
this.moveAhead();
manually?
- _SNIPR-
-
37 posts
Leopard: Edit Scratch projects as JavaScript code
When I make a clone and rhen move it off the screen. The clone response back on screen. Why? And how fix??
- Minestreem
-
33 posts
Leopard: Edit Scratch projects as JavaScript code
ok im gonna unfollow this topic
- Darkmoon9307
-
14 posts
Leopard: Edit Scratch projects as JavaScript code
I have this project that uses clones to make snow, but the clones don't fall. Help?
- Darkmoon9307
-
14 posts
Leopard: Edit Scratch projects as JavaScript code
Exactly! Leopard seems so cool but the only thing i can get to work is the example and not even a simple test that i made to try it even when i press edit as jswhen I try to use Leopard :: hat events
(It doesn't work :: sensing)and<I get triggered :: stack> ::stack
if<I am mad> :: control
Rage
Then not really because i'm not a rager :: motion
Leopard's still cool though

- _SNIPR-
-
37 posts
Leopard: Edit Scratch projects as JavaScript code
Exactly! Leopard seems so cool but the only thing i can get to work is the example and not even a simple test that i made to try it even when i press edit as jswhen I try to use Leopard :: hat events
(It doesn't work :: sensing)and<I get triggered :: stack> ::stack
if<I am mad> :: control
Rage
Then not really because i'm not a rager :: motion
Leopard's still cool though
Ummm leopard does work.
- GalaxyLinus
-
1 post
Leopard: Edit Scratch projects as JavaScript code
Can I make Leopard run fullscreen?
- ndtrung84
-
26 posts
Leopard: Edit Scratch projects as JavaScript code
IDK
when I receive [Hello]
add [Bello] to [list of hellos]
- -ElectronicArts-
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
when [ scratch ] button pressed
say [...]
repeat (round (timer))
move (timer) steps
turn cw (timer) degrees
end
dont spam pleaseIDKwhen I receive [Hello]
add [Bello] to [list of hellos]
- -Isaact-Alt-
-
41 posts
Leopard: Edit Scratch projects as JavaScript code
Big bugs that STILL haven't been fixed yet:
Layering is completely broken
Hidden blocks don't work (ie for, while, when touches, and other things)
…
Layering is completely broken
Hidden blocks don't work (ie for, while, when touches, and other things)
…
- Mario5Sonic
-
49 posts
Leopard: Edit Scratch projects as JavaScript code
I have this project that uses clones to make snow, but the clones don't fall. Help?
Try using a more simple way.