Discuss Scratch

CakeConsumer
Scratcher
5 posts

Leopard: Edit Scratch projects as JavaScript code

?????????????????????
when green flag clicked
say [???????????????????????//] for (2) secs
say [Question Mark]
cppappdeveloper
Scratcher
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;
}
hacktronics
Scratcher
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;
}
}
Forza876
New Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

How can I use Leopard on sb3 files?
CakeConsumer
Scratcher
5 posts

Leopard: Edit Scratch projects as JavaScript code

IDK
_SNIPR-
Scratcher
37 posts

Leopard: Edit Scratch projects as JavaScript code

Forza876 wrote:

How can I use Leopard on sb3 files?
Not too sure
ssvbxx2
Scratcher
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
Scratcher
5 posts

Leopard: Edit Scratch projects as JavaScript code

?????????????????????
comunicazione
Scratcher
15 posts

Leopard: Edit Scratch projects as JavaScript code

PullJosh wrote:

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
Scratcher
15 posts

Leopard: Edit Scratch projects as JavaScript code

PullJosh wrote:

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-
Scratcher
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
Scratcher
33 posts

Leopard: Edit Scratch projects as JavaScript code

ok im gonna unfollow this topic
Darkmoon9307
Scratcher
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
Scratcher
14 posts

Leopard: Edit Scratch projects as JavaScript code

Devin_Scratch wrote:

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 js
when 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
Exactly!

Leopard's still cool though
_SNIPR-
Scratcher
37 posts

Leopard: Edit Scratch projects as JavaScript code

Darkmoon9307 wrote:

Devin_Scratch wrote:

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 js
when 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
Exactly!

Leopard's still cool though

Ummm leopard does work.
GalaxyLinus
Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

Can I make Leopard run fullscreen?
ndtrung84
Scratcher
26 posts

Leopard: Edit Scratch projects as JavaScript code

CakeConsumer wrote:

IDK
when I receive [Hello]
add [Bello] to [list of hellos]
-ElectronicArts-
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

Vann_Nordin wrote:

when [ scratch ] button pressed
say [...]
repeat (round (timer))
move (timer) steps
turn cw (timer) degrees

end

ndtrung84 wrote:

CakeConsumer wrote:

IDK
when I receive [Hello]
add [Bello] to [list of hellos]
dont spam please
-Isaact-Alt-
Scratcher
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)


Mario5Sonic
Scratcher
49 posts

Leopard: Edit Scratch projects as JavaScript code

Darkmoon9307 wrote:

I have this project that uses clones to make snow, but the clones don't fall. Help?

Try using a more simple way.

Powered by DjangoBB