Okay, so basically, I have managed to make my sprite jump up and go back down again, but I have two questions:
Is there a way to make it so that the longer the space bar is held down, the higher it jumps?
And also, how can I make it so that if the sprite is running right, for example, and it jumps, it jumps up in the air, but it doesn't jump straight up, it jumps to the right?
Thanks
Offline
to make it move right while jumping, make sure the jumping scripts and the movement scripts are separate, so that the two scripts can work at the same time.
To make it so the longer the space bar is held down, the higher it jumps. Maybe you could try something like uhh..
<wait until><< <not> <key[ space ]pressed?> >>
and then continue with the script to move the sprite back down?
Offline
Flait7 wrote:
to make it move right while jumping, make sure the jumping scripts and the movement scripts are separate, so that the two scripts can work at the same time.
To make it so the longer the space bar is held down, the higher it jumps. Maybe you could try something like uhh..
<wait until><< <not> <key[ space ]pressed?> >>
and then continue with the script to move the sprite back down?
or put the movement script inside of the jumping part. or you could use velocity.
Offline