This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-05-24 08:08:33

scrin445
New Scratcher
Registered: 2012-05-24
Posts: 9

Jumping Help

I need help on how to make my "Cat" jump. However, to make it realistic, the cat is slightly in the green box (Grass) to make it realistic. I need help in how to do it.

The problem? Because its ankles are in the box, its not as easy to make it jump.

Note 1: Its 2D, not birds-eye view

I'd greatly appreciate it!  smile

(Due to the fact i'm new here, I don't have much info...)

Offline

 

#2 2012-05-24 08:20:34

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Jumping Help

Can you upload the project for us to be able to help more easily? Anyways, you should make a sensing sprite that isn't quite at the cat's sole. Then, set a variable called (touching ground) to true when it's touching the ground and false when not.

Offline

 

#3 2012-05-24 09:23:28

scrin445
New Scratcher
Registered: 2012-05-24
Posts: 9

Re: Jumping Help

And how do I do that?

Offline

 

#4 2012-05-25 07:57:50

scrin445
New Scratcher
Registered: 2012-05-24
Posts: 9

Re: Jumping Help

Uhh... Hello? :\

Offline

 

#5 2012-05-25 22:19:47

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: Jumping Help

Hello scrin445, i have a suggesion for making the sprite jump
This will only work if you do not already have scripts for the y AXIS:

when gf clicked
forever if <key up pressed>
change y by 10
end


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

#6 2012-05-26 00:51:49

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: Jumping Help

Use this. You can adjust the values accordingly, do not use anything other than variables when trying to create realistic movement in your projects. Anyway, Click this link to view the script

Hope I helped! Happy scratching.


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#7 2012-05-27 01:58:41

scrin445
New Scratcher
Registered: 2012-05-24
Posts: 9

Re: Jumping Help

I'm also using a script that keeps the "Cat" down on the grass  neutral

Offline

 

#8 2012-05-27 05:49:03

scrin445
New Scratcher
Registered: 2012-05-24
Posts: 9

Re: Jumping Help

Oh...Nevermind...

Offline

 

#9 2012-05-27 05:53:35

scrin445
New Scratcher
Registered: 2012-05-24
Posts: 9

Re: Jumping Help

Oh wait. When I drop to the grass, it just repeats.

Drops to the tip of the grass, springs up and back down again...Then repeats.

Offline

 

#10 2012-05-28 14:10:35

wasabi56
Scratcher
Registered: 2012-02-10
Posts: 500+

Re: Jumping Help

daniel_j wrote:

Hello scrin445, i have a suggesion for making the sprite jump
This will only work if you do not already have scripts for the y AXIS:

when gf clicked
forever if <key [up arrow v] pressed?>
change y by (10)
end

Fixed  smile

Last edited by wasabi56 (2012-05-28 14:10:57)


http://i.picasion.com/pic58/c23d4d2fc75f459dcf3d9ebf3e8ba395.gif
http://www.weebly.com/uploads/1/0/1/4/10146167/2294523_orig.png

Offline

 

Board footer