I'm still making my very first scrolling project, and I put this script:
<When Green Flag Clicked> <forever if><key [up arrow] pressed] <repeat (20)> <change y by (10)>
That makes him stay up in the air if you press the up and right arrow keys at the same time, the sprite will stay up and it's going to make the whole game seem easy. Can someone help me?
Last edited by a1130 (2010-01-19 16:11:14)
Offline
ill look around... and then I'll link you to a thread which will help you with this.
Offline
if your ground is flat just change your...
if><key [up arrow] pressed]
to
if key [up arrow] pressed and Y < ???
just set ??? to a Y value just above the ground height, so if he is already in the air, it won't jump again or float
Offline
What you can do is this:
forever
if key [up arrow] pressed
repeat 10 times
change y by 10
And also do this:
forever
if not touching colour (whatever ground coulor u have)
change y by -5
if touching (ground colour)
change y by 5
That way you will fall when you jump off something and if you are in the ground you shoot back up!
Lemme know if this helps you.
Offline
Lockinator483 wrote:
What you can do is this:
forever
if key [up arrow] pressed
repeat 10 times
change y by 10
And also do this:
forever
if not touching colour (whatever ground coulor u have)
change y by -5
if touching (ground colour)
change y by 5
That way you will fall when you jump off something and if you are in the ground you shoot back up!
Lemme know if this helps you.
![]()
Dude, if I do that, if I press the up arrow and the right arrow the guy will stay in the air. I don't want him to jump that high.
Offline
Here is my solution:
{When Green Flag CLicked} <forever if ([key up arrow pressed] and [touching color of ground])> <repeat 20> <change y by 10> And (something like this, I can't really remember unless I open that project) {When Green Flag Clicked} [forever if (not {touching color of ground})] [change y by -5] And it's making it better and harder!
Offline