Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
- stevetheplayer525
- Scratcher
100+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
I'll just say this:
My project: https://llk.github.io/scratch-gui/master/#412461268 was Completley broken.
first of all, my charater remained in a falling pose.
And, even MORE
He wouldnt fall like he was supposed to.
I dont know why, but it was BAD.
Real bad.
My project: https://llk.github.io/scratch-gui/master/#412461268 was Completley broken.
first of all, my charater remained in a falling pose.
And, even MORE
He wouldnt fall like he was supposed to.
I dont know why, but it was BAD.
Real bad.
Last edited by stevetheplayer525 (Aug. 13, 2020 18:00:21)
Hello. Im stevetheplayer525 i used to be pretty active here, but im kinda busy with new things, like a game made outside of scratch. but you can still check out my profile if you want, i dont care.
Also, thanks to the dummy who got the servers infested with octopi.
- flameSpectrum
- Scratcher
75 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
trying to make block transalations.
i am fluent at javascript
transalated:
if(((this.x <= -240)||(this.x >= 240))||((this.y <= -180)||(this.y >= 180))) {
this.direction += 180
}
scratch term:
hope you find this helpful
i am fluent at javascript
if on edge, bounce
transalated:
if(((this.x <= -240)||(this.x >= 240))||((this.y <= -180)||(this.y >= 180))) {
this.direction += 180
}
scratch term:
if <<<(x position) < [-239]> or <(x position) >[239]>> or <<<(y position) < [-179]>> or <<(y position) > [179]>>>> then
rotate right [180] degrees
end
hope you find this helpful
Last edited by flameSpectrum (Aug. 17, 2020 00:56:47)
- flameSpectrum
- Scratcher
75 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
2nd block:
in a sprite, it could possibly be this:
new Trigger(Trigger.BackdropChange, { this.stage.costume ==“backdrop1” }, this.myscript
in a stage it could possibly be this:
new Trigger(Trigger.BackdropChange, { this.costume ==“backdrop1” }, this.myscript
when backdrop switches to [backdrop1 v]
in a sprite, it could possibly be this:
new Trigger(Trigger.BackdropChange, { this.stage.costume ==“backdrop1” }, this.myscript
in a stage it could possibly be this:
new Trigger(Trigger.BackdropChange, { this.costume ==“backdrop1” }, this.myscript
- flameSpectrum
- Scratcher
75 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
another custom block method:
function mycustomblock(x, y) {
yield* this.sayandwait(x, 2);
this.move(y);
}
my custom block (x) (y)
function mycustomblock(x, y) {
yield* this.sayandwait(x, 2);
this.move(y);
}
- Pufferfish_Test
- Scratcher
500+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
This wouldn't work because that's if the centre is touching the edge, not the edge of the sprite touching the edge. Sorry! trying to make block transalations.
i am fluent at javascriptif on edge, bounce
transalated:
if(((this.x <= -240)||(this.x >= 240))||((this.y <= -180)||(this.y >= 180))) {
this.direction += 180
}
scratch term:if <<<(x position) < [-239]> or <(x position) >[239]>> or <<<(y position) < [-179]>> or <<(y position) > [179]>>>> then
rotate right [180] degrees
end
hope you find this helpful
Also, this will only bounce in the right direction if it is directly perpendicular to the edge.
Last edited by Pufferfish_Test (Aug. 17, 2020 15:42:58)
This is my signature, and appears below eeevvvveeerrrryyy post I write
Try out Ocular
Good evening. I am a gerbil. Are you a gerbil? I know I am. Gerbils are possibly the most important beings in the universe; they are super intelligent and they eat carrots so we don't have to.
If you are reading this, you're probably thinking one of 3 things:
- This dude's not a gerbil, he's a pufferfish/human/bison/whatever other organism/inanimate object you mistakenly believe I am.
- Why am I reading this????????
- I'm hungry
The second one is a valid question, and one that has no satisfactory answer other than that you're really ,really, really bored.
As for the 3rd one - so am I. You're not alone.
- flameSpectrum
- Scratcher
75 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
you could also technically subtract size/2
- Pufferfish_Test
- Scratcher
500+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
You could do, but you'd need to find a way to get the size. you could also technically subtract size/2
This is my signature, and appears below eeevvvveeerrrryyy post I write
Try out Ocular
Good evening. I am a gerbil. Are you a gerbil? I know I am. Gerbils are possibly the most important beings in the universe; they are super intelligent and they eat carrots so we don't have to.
If you are reading this, you're probably thinking one of 3 things:
- This dude's not a gerbil, he's a pufferfish/human/bison/whatever other organism/inanimate object you mistakenly believe I am.
- Why am I reading this????????
- I'm hungry
The second one is a valid question, and one that has no satisfactory answer other than that you're really ,really, really bored.
As for the 3rd one - so am I. You're not alone.
- flameSpectrum
- Scratcher
75 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
I think you could also have the edge to be a sprite.
so the code would be like this:
if (this.touching(this.sprites.edge())) {
this.direction += 180
}
so the code would be like this:
if (this.touching(this.sprites.edge())) {
this.direction += 180
}
- SuperStickFigures
- Scratcher
500+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
thank you just thank you I was wanting this to happen!
I don't share projects that often anymore but I do create some. I'm not telling you what they are :)
Press Shift+Down because its good lol
We need help with the K9 collab! Click on the image above for more information ℹ️
Scratch is the best: misleading EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
when green flag clicked
set [ v] to [you can see this LOL]
You should be reading the post but idc what you read to be honest, but since you are reading this:
https://scratch.mit.edu/discuss/topic/470265
- caftingdead261
- Scratcher
81 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Scratcher
6 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
help whenever I try to put in my project it says this {“errors”:{“detail”:}}
- -GODSPEED-
- Scratcher
5 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
can i have the link? plz
- -GODSPEED-
- Scratcher
5 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
umm i dont think he was alive in the 1500s it was the 1700sno I say a big fat NOOOOOOOO
?
- ajsya
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
plzThe website is here: can i have the link? https://leopardjs.now.sh/
- meh_name_not_jeff
- Scratcher
100+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
is there a donation link or anything?
300 posts and Join the halloween shop!!![/url]
- meh_name_not_jeff
- Scratcher
100+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
hi
Last edited by meh_name_not_jeff (Sept. 2, 2020 14:35:21)
300 posts and Join the halloween shop!!![/url]
- flameSpectrum
- Scratcher
75 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
@caftingdead261, because this.say isn't defined
- haha23thecool
- Scratcher
2 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
I am trying to make my own into Leopard but for some reason, it doesn't work when I press “Green Flag” https://scratch.mit.edu/projects/426634110/editor is my project… I used a pen block yet what's wrong?
- PullJosh
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Hey everyone! I found two videos on my computer that I had totally forgotten about! They're two Leopard tutorials I recorded a long time ago.
I've uploaded the first, What is “Yield” in Leopard?, so definitely check it out. I hope to edit and upload the second one soon.
Have a great day!
I've uploaded the first, What is “Yield” in Leopard?, so definitely check it out. I hope to edit and upload the second one soon.
Have a great day!
- Ihatr
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Cool! Hey everyone! I found two videos on my computer that I had totally forgotten about! They're two Leopard tutorials I recorded a long time ago.
I've uploaded the first, What is “Yield” in Leopard?, so definitely check it out. I hope to edit and upload the second one soon.
Have a great day!