Discuss Scratch

theuglybeast1
Scratcher
14 posts

Frog jumping

Hello,

I am going to have a frog jumping from one section to another, but further down. I can work out a “y=-x^2” where there will be a part missing. I have to do this for 3 frogs. Curious if there is a easier way where I can draw a line and adjust it and then the frog follows it. Of course I will need to have the line disappear.

Any suggestions?

It would be really good if there is a function for this.
deck26
Scratcher
1000+ posts

Frog jumping

Your explanation isn't clear. Better if you can share what you have so far.
theuglybeast1
Scratcher
14 posts

Frog jumping

Dear deck26,

I haven't put anything down yet.

I have a frog in GIF format. When I imported in to scratch I have different costumes to make up the GIF. This is fine. This frog is a frog that is jumping. However it is jumping in the one spot.

What I'd like to do is to project the frog from one point to another. From example, from x/y coordinates (0.0) to (10,10) to (40, -80). Is there some easier procedure built in so you can project an object with gravity?

Cutie_Pooge
Scratcher
500+ posts

Frog jumping

You can simulate gravity easily with a variable.
whenclickedsetxVelto5setyVelto8repeat15changeyVelby-1changexbyxVelchangeybyyVel
Just modify the numbers to what you want
Oumuamua
Scratcher
1000+ posts

Frog jumping

theuglybeast1 wrote:

Dear deck26,

I haven't put anything down yet.

I have a frog in GIF format. When I imported in to scratch I have different costumes to make up the GIF. This is fine. This frog is a frog that is jumping. However it is jumping in the one spot.

What I'd like to do is to project the frog from one point to another. From example, from x/y coordinates (0.0) to (10,10) to (40, -80). Is there some easier procedure built in so you can project an object with gravity?


Hi, if the frog is already jumping(animated) you don't need gravity at all, just to adjust timing between costumes.
You should share the project…

Last edited by Oumuamua (July 25, 2020 09:40:51)

theuglybeast1
Scratcher
14 posts

Frog jumping

Dear Cutie_Pooge,
I didn't notice your comment until then. Sorry.
I don't think this would work, but good idea.
I have the beginning point and the ending point. Therefore initial height and range would be given. I can put an angle in.
All I want is a perfect projectile. That means I can keep this and put this into different programs and change the sprite. I'm looking up all the formulas but I can't yet draw this.
Cheers.
Martin
theuglybeast1
Scratcher
14 posts

Frog jumping

Dear Oumuamua,

I have actually had a go at positioning the frog in different positions but it is not really great. Of course when the frog is on the correct path, I will have to change the costumes but this will be smoother.

Cheers.
theuglybeast1
Scratcher
14 posts

Frog jumping

Dear Cutie_Pooge,

I finally decided to use your idea.

Cheers!

Cutie_Pooge
Scratcher
500+ posts

Frog jumping

Hope it worked, feel free to show the result and I would be happy to modify it if you want are not satisfied with the result.

Powered by DjangoBB