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

#1 2013-02-07 04:21:00

Danielallmighty
New Scratcher
Registered: 2013-02-07
Posts: 2

Jump and not fall into ground

If my character jump, how do I make it land above the ground without glitches?

And I don't want the jump to look lame just to be able to make a nice landing.

Offline

 

#2 2013-02-07 07:17:52

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Jump and not fall into ground

Well, it depends. Do you want an entirely new jumping script or just someone to help you fix the one that you already have? If you want someone to help fix your scripts, then you'll need to either upload your project or show your scripts.

Anyway, hello Danielallmighty and welcome to Scratch! I hope that you'll have a fun time here!


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2013-02-07 08:15:43

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Jump and not fall into ground

ErnieParke wrote:

Well, it depends. Do you want an entirely new jumping script or just someone to help you fix the one that you already have? If you want someone to help fix your scripts, then you'll need to either upload your project or show your scripts.

Anyway, hello Danielallmighty and welcome to Scratch! I hope that you'll have a fun time here!

+1

This wiki article may help you.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#4 2013-02-07 08:32:18

Danielallmighty
New Scratcher
Registered: 2013-02-07
Posts: 2

Re: Jump and not fall into ground

Well, after thinking about it. I think that what I want is impossible in scratch.

I guess you can't detect collisions before you move the character.

Or can you hide a copy of your sprite and use that as a collision detector?

Offline

 

#5 2013-02-07 16:28:33

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Jump and not fall into ground

Danielallmighty wrote:

Well, after thinking about it. I think that what I want is impossible in scratch.

I guess you can't detect collisions before you move the character.

Or can you hide a copy of your sprite and use that as a collision detector?

Well, actually, it is possible to detect collisions before you move, and there are a few ways that involve sensing after your character moves, and no movement is noticeable unless allowed by the script.

Also, yes, your method is actually one of them that would work, though it might be better to actually use a sprite specifically designed to be a sensor instead of the character itself. For example:

http://i.imgur.com/fRIwq1P.gif

Key:
Yellow - Checks if left movement is possible.
Green - Checks if right movement is possible.
Orange - Checks if up movement is possible.
Blue - Checks if on floor.
Pink - Checks if in floor.

Last edited by ErnieParke (2013-02-07 16:29:48)


http://i46.tinypic.com/35ismmc.png

Offline

 

#6 2013-02-08 09:07:35

MaanGames
New Scratcher
Registered: 2013-01-18
Posts: 6

Re: Jump and not fall into ground

You can do this without a collision detector sprite/ costume!
Just with your player costume...
I made a platformer engine, maybe you want to use the engine or the scripts help you!  smile
link:
http://scratch.mit.edu/projects/MaanGames/3045995

Offline

 

#7 2013-02-09 10:42:20

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Jump and not fall into ground

Danielallmighty wrote:

Well, after thinking about it. I think that what I want is impossible in scratch.

I guess you can't detect collisions before you move the character.

Or can you hide a copy of your sprite and use that as a collision detector?

You can move, see if you're touching, and then move back before the movement is rendered.  This means the user won't see the sprite temporarily inside a floor/wall and you can do all your sensing with only one sprite  smile


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#8 2013-02-17 15:23:24

bataglia5
Scratcher
Registered: 2013-02-13
Posts: 3

Re: Jump and not fall into ground

I Think This Might Be What You Need For The Jump

when [space v] key pressed
repeat [10]
change y by [15]
repeat [10]
change y by [-15]

Offline

 

#9 2013-02-17 20:49:24

bob6
Scratcher
Registered: 2010-07-01
Posts: 100+

Re: Jump and not fall into ground

bataglia5 wrote:

I Think This Might Be What You Need For The Jump

when [space v] key pressed
repeat [10]
change y by [15]
repeat [10]
change y by [-15]

Well, he might be using yVel so that won't work for him.


http://i46.tinypic.com/3148ksz.gif

Offline

 

#10 2013-02-17 22:33:31

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Jump and not fall into ground

Use the engine from chanmanpartyman's platformer 2000-something.  It's really good.


http://i47.tinypic.com/2iaa73k.png

Offline

 

Board footer