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

#1 2012-03-20 06:56:02

aussiegamerkid
New Scratcher
Registered: 2012-03-20
Posts: 1

Help with my school project please

Hey everyone i have a problem with my school project we are making a game and was wondering why this was happening in my game?

when i jump i made it so i can move and jump but i also made it when i hit left key i turn -90* so i face left but when i jump and hit left to move left i move right but i face left? why is that happeneing?

also i have another problem

how do i make a solid object that i can land on when i jump and cant walk through?

Offline

 

#2 2012-03-20 14:29:58

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Help with my school project please

For the first question: Are you moving in the right direction? Try a negative number.
For the second: Have something like this:

when gf clicked
forever
  change y by (-1)
  if <touching color [#000000]?> //replace with your color
    change y by (2)
  end
Hope that helped!

Last edited by scimonster (2012-03-20 14:30:11)

Offline

 

#3 2012-03-21 19:55:20

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: Help with my school project please

For the problems with moving, maybe you are doing this:

move [some amount of] steps
When you should be doing this:
change x by [some amount of steps]
The difference is that when you are facing left and you move an amount of steps, you move left because it steps in the direction that the sprite is facing. You should use the script:
change x by [some amount of steps]
because it will make the sprite move x(x is your sprite's horizontal position (left and right)) by a certain amount, no matter what direction it is facing. If you want to move left, make it change x by a negative number. I hope that helps you with your first problem  smile  , but i dont know about the other one.  sad

Last edited by AgentRoop (2012-03-21 19:57:05)


La La
I wrote an album.

Offline

 

#4 2012-03-21 20:12:57

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Help with my school project please

AgentRoop wrote:

For the problems with moving, maybe you are doing this:

move [some amount of] steps
When you should be doing this:
change x by [some amount of steps]
The difference is that when you are facing left and you move an amount of steps, you move left because it steps in the direction that the sprite is facing. You should use the script:
change x by [some amount of steps]
because it will make the sprite move x(x is your sprite's horizontal position (left and right)) by a certain amount, no matter what direction it is facing. If you want to move left, make it change x by a negative number. I hope that helps you with your first problem  smile  , but i dont know about the other one.  sad

This is the solution to your problem, and I just wanted to let you know that a negative number moves you left along the x axis if you put it in that block. For the y axis, a negative moves you down.

Offline

 

Board footer