<if><key[ Space ]pressed?>
<glide( 1 )secs to x <x position>)y (( <y position> <+> 150 ))
<wait( 0.0000001 )secsc>
<glide( 1 )secs to x <x position>)y (( <y position> <-> 150 ))
That is the EASYEST way to make a sprite jump!!!!!!!!!!
Hope it helped!
For the peeps who can't understand that:-
<<If>>(key[Space]pressed?)
<<glide(1)sec to x: (<x position>)y (<y position> <+> 150))
<<Wait(0.0000001)secs>>
<<glide(1)sec to x: (<x position>)y (<y position> <-> 150))
And for muppits who can't understand THAT:-
If key space pressed
Glide 1 sec to x: (x position)y (y position) plus 150)
wwait(0.0000001)secs
glide 1 sec to x: (x position)y (y position) minus 150)
And thats it!
P.S. This is only for the peeps who are making a scrolling background but a static Character! Soz
Last edited by WEESTRAWZ (2008-02-17 16:40:10)
Offline
If you do that then you won't be able to move left or right while jumping.
Try this if you want a really simple jump.
<when[ space ]key pressed>
<repeat( 10
<change y by( 4
<end>
<repeat( 10
<change y by( 4
<end>
<end>
Offline
Yeh but thats for a MOVING sprite this is for a moving background but a STATIC Character so you can move!
Its not your fault though i didn't put that in first!
---->Strawz<----
_________________________________________________________________________________
Copy and paste this into your Signature if you think people that STEAL your project and say it was them who done it, can't really program on scratch coz they have to steal other peoples projects!
Last edited by WEESTRAWZ (2008-02-17 16:44:31)
Offline
I tried the one that archmage posted and it is easier(sorry strawz). But I still need to know how to move left and right while jumphing. Please help me this is my first day on Scratch!
Offline
le_cassie_d wrote:
I tried the one that archmage posted and it is easier(sorry strawz). But I still need to know how to move left and right while jumphing. Please help me this is my first day on Scratch!
Heres a simple movement script.
<when green flag clicked>
<forever>
<if> <key[ right ]pressed?>
<change x by( 5
<end>
<if> <key[ left ]pressed?>
<change x by(- 5
<end>
<end>
Offline
Thank You Sooo Much!
Offline
archmage, you should be a forum moderator, helping people out.
Offline
if you want a simple jump script that is actually useful, then try this<when green flag clicked><forever><if>key up arrow pressed<change{ y vel}by( 5)
<change y by( y vel
Offline
FPSFelix wrote:
if you want a simple jump script that is actually useful, then try this<when green flag clicked><forever><if>key up arrow pressed<change{ y vel}by( 5)
<change y by( y vel
That script will make a sprite move up but not back down.
Offline
yeah, but then you have
if not touching<whatever ground color or sprite is>
change y vel by -0.1
and
if touching<whatever ground color or sprite is>
set y vel to 0
Offline
Why didn't you mention that in your other post then? You can't expect people to already know these things.
Offline
thanks you all
Offline
now im gonna make a game called cyclone
Offline
well, i figured that with a little experimentation, they could figure it out themselves instead of being handed everything by other people
Offline
I combined som idas here and got a pretty smooth jump. I'll post it soon.
Offline