Discuss Scratch

CakeConsumer
Scratcher
5 posts

Leopard: Edit Scratch projects as JavaScript code

?????????????????????
when green flag clicked
say [???????????????????????//] for (2) secs
say [Question Mark]

CakeConsumer
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;
}
}

CodeSkool: Beyond Scratch with ML, AI, Python, HTML5, Arduino, Games…
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

CakeConsumer
_SNIPR-
Scratcher
37 posts

Leopard: Edit Scratch projects as JavaScript code

Forza876 wrote:

How can I use Leopard on sb3 files?
Not too sure

Cutting myself just to feel something
What's the point in having love with no pain?
What's the point in having blood with no veins?
Wake up and take your own advice!
Why you act like I'm not a part of this?
You can't get rid of all of me!
I thought I told you to keep your mouth shut!
What you don't like being afraid?
My therapist told me not to bury my issues but I ain't gonna lie I'm feeling great!
I thought you had me imprisoned this whole time, but I'm the one holding the keys!
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

I'm ssvbxx2. I make a variety of original projects: games, animations, etc.

(Tile Scrolling Project | Square Root Calculator | The Sound of Sorting)

Last edited by kaj (Next year 00:00:00)
CakeConsumer
Scratcher
5 posts

Leopard: Edit Scratch projects as JavaScript code

?????????????????????

CakeConsumer
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??

Cutting myself just to feel something
What's the point in having love with no pain?
What's the point in having blood with no veins?
Wake up and take your own advice!
Why you act like I'm not a part of this?
You can't get rid of all of me!
I thought I told you to keep your mouth shut!
What you don't like being afraid?
My therapist told me not to bury my issues but I ain't gonna lie I'm feeling great!
I thought you had me imprisoned this whole time, but I'm the one holding the keys!
Minestreem
Scratcher
33 posts

Leopard: Edit Scratch projects as JavaScript code

ok im gonna unfollow this topic

when I receive [a problem v]
ask [help] and wait
if <[problem] = [solved]> then
play sound [applause v]
else
repeat until <[i am satisfied] = [true]>
ask [help] and wait

end
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?

oh no

the kumquats are coming
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

oh no

the kumquats are coming
_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.

Cutting myself just to feel something
What's the point in having love with no pain?
What's the point in having blood with no veins?
Wake up and take your own advice!
Why you act like I'm not a part of this?
You can't get rid of all of me!
I thought I told you to keep your mouth shut!
What you don't like being afraid?
My therapist told me not to bury my issues but I ain't gonna lie I'm feeling great!
I thought you had me imprisoned this whole time, but I'm the one holding the keys!
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)



-Isaact-Alt-
Main Account: -Isaact-
My friends are: _–Daniel_2–_, Scratcher1049, RC777Again, TheScratcher2021_ME, harduy91, and StickManGMalt.

I usually only go on the forums if I don't know what else to do.
Mario5Sonic
Scratcher
48 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.

kia ora!
when green flag clicked
repeat (10)
turn cw () degrees
end
say [hey, you lookin at me??] for (2) secs

Powered by DjangoBB