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
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) endHope that helped!
Last edited by scimonster (2012-03-20 14:30:11)
Offline
For the problems with moving, maybe you are doing this:
move [some amount of] stepsWhen 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 , but i dont know about the other one.
Last edited by AgentRoop (2012-03-21 19:57:05)
Offline
AgentRoop wrote:
For the problems with moving, maybe you are doing this:
move [some amount of] stepsWhen 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 , but i dont know about the other one.
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