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

#1 2010-02-15 21:12:26

svyamana
Scratcher
Registered: 2009-01-11
Posts: 19

-->Advanced Jumping<--

Hi-

I am making a super high quality commando game (It's based on commando from miniclip: http://www.miniclip.com/games/commando-2/en/) and I am having trouble with a few things:

>>I need for my commando sprite to be able to jump...its hard to explain, so here is a (very bad) diagram:

                       ^          |
Can go up  ____|_______V___
                      |    Can't go down
                             
He must be able to go through a terrain sprite when going up, but not when going down.

Thanks!

Offline

 

#2 2010-02-15 21:14:37

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: -->Advanced Jumping<--

Do this:
If touching <terrain sprite> and y vel. < 0
        If <key: up arrow pressed>
        set y vel. to 5
        else
       set y vel to 0
else
change y vel by -1

Wait, lemme get a picture...


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2010-02-15 21:17:05

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: -->Advanced Jumping<--

Wait, here:
http://i47.tinypic.com/316ma1x.gif


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#4 2010-02-15 21:26:02

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: -->Advanced Jumping<--

Drat, that script will glitch up.  Use this one instead:
http://i49.tinypic.com/29wq2df.gif


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#5 2010-03-03 20:17:56

svyamana
Scratcher
Registered: 2009-01-11
Posts: 19

Re: -->Advanced Jumping<--

ok thanks...i will try it!

Offline

 

#6 2010-03-03 20:27:49

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: -->Advanced Jumping<--

Those scripts should work. I guess you could also just change y. But that is too easy. Lol.


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

#7 2010-03-05 00:50:31

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

Re: -->Advanced Jumping<--

A Commando 2 game in Scratch? Very ambitious... You should use RHY's Perfect Platformer Base...


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#8 2010-03-05 22:35:19

svyamana
Scratcher
Registered: 2009-01-11
Posts: 19

Re: -->Advanced Jumping<--

ok i will check it out...i am open to ALL thoughts and comments and questions!

Offline

 

Board footer