hey guys i know this is spam but it would mean alot to me if u guys joined and rpged in my lost RPG.... it tok me hours to create last summer and id like to keep ti alive cuz its my only successful RP heres the link: http://scratch.mit.edu/galleries/view/55906 plz dont hate me for spam DX
Offline
tpg56 wrote:
I was wondering, if I made a platforming game, how would I program my main sprite to jump?
make variables: Gravity, Yvel, INAIR and Jump.
Ok do this:
<when green flag clicked>
<set{Gravity}to(-0.3)
<set{INAIR}to(0)
<set{Yvel}to(0)
<set{jump}to(3)
<forever>
<if><key[up arrow]pressed?>
<if><touching color[Black]
<change{Yvel}by(<{Jump}>)
<end>
<if><< <not><touching color[BLACK]>>
<set{INAIR}to(1)
<else>
<set{INAIR}to(0)
<end>
<if><(<{INAIR}> <=> 1 )>
<change{yvel}by(<{gravity}>)
<end>
<change y by(<{yvel}>)
Offline
zAmber wrote:
hey guys i know this is spam but it would mean alot to me if u guys joined and rpged in my lost RPG.... it tok me hours to create last summer and id like to keep ti alive cuz its my only successful RP heres the link: http://scratch.mit.edu/galleries/view/55906 plz dont hate me for spam DX
Hey zAmber, it's great that you want to show us your gallery, but when you want to show other people your gallery, it isn't very nice to create an off-topic post on someone else's thread. Have you tried using the 'Show and Tell' forum? The 'Show and Tell' forum is a good place top share your gallery with others.
Offline
Without velocity:
With velocity:
Any questions?
Offline