Discuss Scratch

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.

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

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:

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:

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!

flameSpectrum wrote:

trying to make block transalations.
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
This wouldn't work because that's if the centre is touching the edge, not the edge of the sprite touching the edge. Sorry!
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:
  1. This dude's not a gerbil, he's a pufferfish/human/bison/whatever other organism/inanimate object you mistakenly believe I am.
  2. Why am I reading this????????
  3. I'm hungry
The first one is INCORRECT, and I'm going to have to ask you not to spread that false rumour.
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!

flameSpectrum wrote:

you could also technically subtract size/2
You could do, but you'd need to find a way to get the size.

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:
  1. This dude's not a gerbil, he's a pufferfish/human/bison/whatever other organism/inanimate object you mistakenly believe I am.
  2. Why am I reading this????????
  3. I'm hungry
The first one is INCORRECT, and I'm going to have to ask you not to spread that false rumour.
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
}
caftingdead261
Scratcher
81 posts

Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!

help whenever I try to put in my project it says this {“errors”:{“detail”:}}

I make random stuff and experiment with cloud variables.
I love Scratch mods and projects that use scratch in unique ways.
(semi-active) (only active on forms)
when F5 is clicked :: hat events
unlock a whole new perspective

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 ℹ️

SuperStickFigures wrote:

misleading EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Scratch is the best:
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”:}}

I make random stuff and experiment with cloud variables.
I love Scratch mods and projects that use scratch in unique ways.
(semi-active) (only active on forms)
when F5 is clicked :: hat events
unlock a whole new perspective

-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!

mrCamelCase wrote:

BerBoy876 wrote:

no I say a big fat NOOOOOOOO

?
umm i dont think he was alive in the 1500s it was the 1700s
ajsya
Scratcher
1000+ posts

Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!

-GODSPEED- wrote:

can i have the link? plz
The website is here: https://leopardjs.now.sh/

Feel free to message me on my profile if you need to tell me something/want someone to talk to.

Hi, I'm ajsya!

| GitHub | Wiki | My Posts |

Before creating a new topic on the forums search Ocular to see if one already exists!ˇ
meh_name_not_jeff
Scratcher
100+ posts

Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!

is there a donation link or anything?
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)

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!
Ihatr
Scratcher
1000+ posts

Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!

PullJosh wrote:

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!
Cool!


this is a link

Powered by DjangoBB