I'm working on this game, and i'm having trouble's with the jump for my character. When he jumps, if you hold down the button, he just rises up until you let go. Plus, i can't make him change direction in midair. Can someone help me out with that?
P.S. what are "scratch blocks"?
Offline
Well, I can answer one of your questions. "Scratch blocks" are those blocky-looking things you snap together to make your project do whatever you want it to do.
For example, this is a Scratch block:
<if on edge, bounce>
This is as well:
<when green flag clicked>
Last edited by gettysburg11 (2010-11-21 20:25:35)
Offline
Could you upload it? That's the only way we'll be able to help you.
Scratch blocks are the script pieces that you connect together to make things work.
Offline
1) All right, i'll upload the beta asap
2) what happens when you add it to a forum post
Offline
Onyxsbayne wrote:
2) what happens when you add it to a forum post
Nothing special really happens, adding blocks to posts is mainly used for showing other users the script(s) needed if they wanted to do something specific in Scratch.
Offline
I like making a variable called "air", then setting "air" to 1 when you jump. You can not jump if "air" is 1. When you hit the ground (or didn't jump), set the "air" variable to 0.
Offline
When green flag clicked
Forever
If up arrow key pressed
Repeat until not up arrow key pressed
Change y by 2
EndIf
If not touching colour colour-of-the-ground
Change y by -2
EndIf
EndForever
and then
When green flag clicked
Forever
Put your rotation script here
EndForever
Offline