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

#1 2011-01-22 14:01:44

uzumaki69naruto
Scratcher
Registered: 2011-01-04
Posts: 17

Need Working Jump Script

I Need A Jump Script For A Big Game!

Offline

 

#2 2011-01-22 14:29:53

Shadowed1
Scratcher
Registered: 2010-01-19
Posts: 100+

Re: Need Working Jump Script

This is a basic jump script:
First you need to program the jump:

<when[ space/up arrow ]key pressed><if> <touching color[(color of ground)]><repeat( 10)<change y by( 9)

Now for the ground sensing. First of all, you need to edit the sprite that's going to be jumping. On the very bottom of it, put a thin strip going along the bottom of the sprite and change the color to one that is not the ground color or original. It doesn't matter which one you choose, as it's not noticeable.

<when green flag clicked> <forever><repeat until><color[ (color of the thin strip on the bottom of the sprite) ]is over[ (color of the ground)><change y by( -4 )

If you're a bit uncertain on the scripting, go to Cube World and check out the scripts there.


*Insert some witty, funny or sarcastic comment here*

Offline

 

#3 2011-01-22 15:51:56

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Need Working Jump Script

I like this project for jumping:

http://scratch.mit.edu/projects/archmage/72848

Very easy to follow.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

Board footer