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

#26 2008-06-29 18:45:29

sonick636
Scratcher
Registered: 2008-05-18
Posts: 2

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

<key[  ]pressed?><<  <not>  >>

LoneFox wrote:

what do you mean "not right arrow key pressed"?

For the category numbers, there's a thing called "not[blank]". That's where you put in the key[blank] pressed. Now it says "not key[blank] pressed?"


Kung Fucius says: Those who sleep with itchy butt wake up with smelly fingers!

Offline

 

#27 2008-06-30 10:43:21

brgbdg9nanana
Scratcher
Registered: 2008-04-23
Posts: 19

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

I made a platforming demo, which you can veiw here. Sprite movement demo


Brgbdg9nanana  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  smile  roll  big_smile  cool  lol  tongue Click here for an awesome stickman game! Need help with making a platforming game?

Offline

 

#28 2009-09-06 20:24:54

Waflez
Scratcher
Registered: 2009-09-05
Posts: 1

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

OMGGGGGGGGG PLZ HELP I JUMP ON MY PLATORM BUT AS SOON AS I DO THAT I CAN FLOAT AND MOVE INSTANTLY BaCK AND FORTH TILL I JUMP AGAIN

Offline

 

#29 2009-10-19 21:41:49

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

I'm tring to get gravity to work, help me!
[blocks]
<when green flag clicked>
<forever>
<if><key[ left arrow ]pressed?>
<change x by( -2
<end>
<if><key[ right arrow ]pressed?>
<change x by( 2
<end>
<if><key[ space ]pressed?>
<if><touching color[ black
<if><( <{ Jumping }> <=> 0 )>
<set{ Jumping }to( 1
<repeat( 20
<change y by( 2
<end>
<set{ Jumping }to( 0
<else>
<repeat until><touching color[ black
<change y by( -2
<end>
<end>
<end>
<end>
<when green flag clicked>
<forever>
<if><<  <not> <touching color[ black >>
<if><( <{ Jumping }> <=> 0 )>
<repeat until><touching color[ black
<change y by( 2
<end>
<end>
<end>
<end>

Last edited by ThePCKid (2009-10-19 21:42:28)

Offline

 

#30 2009-11-03 13:29:39

nitromegamer
Scratcher
Registered: 2009-08-13
Posts: 45

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

Boopaloo wrote:

Nearly everthing is working, sort of..... but I want the character to chance costumes when he's walking. I've tryed this code:

When right arrow pressed
Forever if <Right arrow pressed>
change x by 3
point in direction 90
Repeat until <NOT right arrow key pressed>
switch to costume 1walk
wait 0.25 secs
switch to costume 2walk

But for some reason it just goes all juddery and doesn't move when I press the arow keys??? Aaaaarrrggg!!! Please help me someone!!!

Instead, you have to do this:

When flag clicked
Forever if key right arrow pressed
point in direction 90
change X by 3

When flag clicked
Forever if key right arrow pressed
next costume
wait 0.25 seconds





What I did differently was that they are 2 seperate scripts. If it is one script, the "wait 0.25 seconds" will cause the entire script to pause, not just the costume change. I also changed some things to prevent bugs/glitches.

Offline

 

#31 2010-01-05 23:39:55

MasterOfDeception
Scratcher
Registered: 2009-12-29
Posts: 100+

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

S65 wrote:

Assuming you just want your character to move along flat one-color surfaces with no walls, slopes, or mid-air platforms (walls, slopes and mid-air platforms are where the programming can get complicated), a basic engine allowing for left movement, right movement, and jumping/gravity would work like this:

when green flag clicked
     forever
         if key left arrow pressed
                  change x by -2
         if key right arrow pressed
                   change x by 2
         if key space pressed
              if touching color []
                   if jumping = 0
                       set jumping to 1
                        repeat 20
                            change y by 2
                        set jumping to 0

when green flag clicked
     forever
              if not touching color []
                   if jumping = 0
                          repeat until touching color []
                                change y by -2

(replace color [] with color of platform)

The jumping variable is just a flag to indicate that you're jumping so the gravity script which pulls you down doesn't take place. When space is pressed, it sets the jumping flag to 1, and changes your y position by 2 20 times so that you go up. Then it sets jumping to 0, so the gravity effect takes place, which pulls you down until you're touching the []-color platform.

I'm sorry if I explained this badly, I suck at explaining things.  sad

You have to put 

if right arrow pressed
  change x by 2

if left arrow pressed
  change x by -2


blocks in the jumping repeat block so you can move in the air and don't just jump straght up and down


"My Language Arts teacher beat Chuck Norris up." -12three

Offline

 

#32 2010-01-07 04:07:05

domben
Scratcher
Registered: 2009-12-05
Posts: 71

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

Post your project and Ill take a look, check out my platformer "Air" if you need any mroe  help!!!!http://scratch.mit.edu/projects/domben/825141


Check out Air today! Air is a highly realistic platformer with extremely difficuly levels!
Add grob the slime to your signature to help him take over the world! http://is.gd/d55N3

Offline

 

#33 2010-01-07 05:40:36

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

domben wrote:

Post your project and Ill take a look, check out my platformer "Air" if you need any mroe  help!!!!http://scratch.mit.edu/projects/domben/825141

This topic started back in 2007.  I think the author has probably figured it out or moved on by now  smile


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#34 2010-03-28 09:22:30

qwertypower
Scratcher
Registered: 2010-02-24
Posts: 100+

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

S65 wrote:

Assuming you just want your character to move along flat one-color surfaces with no walls, slopes, or mid-air platforms (walls, slopes and mid-air platforms are where the programming can get complicated), a basic engine allowing for left movement, right movement, and jumping/gravity would work like this:

when green flag clicked
     forever
         if key left arrow pressed
                  change x by -2
         if key right arrow pressed
                   change x by 2
         if key space pressed
              if touching color []
                   if jumping = 0
                       set jumping to 1
                        repeat 20
                            change y by 2
                        set jumping to 0

when green flag clicked
     forever
              if not touching color []
                   if jumping = 0
                          repeat until touching color []
                                change y by -2

(replace color [] with color of platform)

You want to see these scripts in action? Go to my project
How to make a platform game. I did change some of the scripts so it would do what I wanted it to do


http://img690.imageshack.us/img690/8586/x1eo8x.png  http://img690.imageshack.us/img690/9164/logozrv.png
http://img693.imageshack.us/img693/8186/image843.png      http://img411.imageshack.us/img411/406/bobs.png      http://img535.imageshack.us/img535/2898/firegrob.png     Add zip the cybug, bob the sea urchin, and firegrob to your sig!

Offline

 

#35 2010-03-28 14:18:30

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

Close please.

This has been bumped 3 times.  tongue


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#36 2010-04-01 13:39:00

NeilWest
Scratcher
Registered: 2010-01-06
Posts: 1000+

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

Offline

 

#37 2010-04-01 13:40:27

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: HELP ME!!! I WANNA MAKE A PLATFORM GAME!

I believe this topic is rather old and resolved. Perhaps it is time to have it closed.  smile


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

Board footer