Pages: 1
Topic closed
how do you make sprites fall on sratch? my guy can run around and go up things and stuff, jup up on things, but he cant get down because when he walks off them he just floats! please can someone help me out my game could be so awesome it is a shooter my first proper project and it is going really well if bots, and a multiplayer mode with various levels to choose from, i really want this to be a success so can someone please help me?
Offline
Do something like:
[forever]
[][if <not <touching [Ground]?>]
[][][change y by (-5)]
[][end if]
[end forever]
Does that work?
Offline
As Jonathonpb shows above, you need to change the Y position of your sprite when it is not touching whatever you decide is "ground". There are a number of ways to do this...using the Motion block "Change Y by " is probably the easiest. For ground sensing, you can either use a color (with color sensing) or a sprite (with sprite touching sensing) or even a certain Y position of your sprite. It's up to you
If you need some examples, there are a bunch out there. Here's a small gallery of demos and tutorials you might find useful
http://scratch.mit.edu/galleries/view/71745
Offline
There are more advanced ways of doing this, but the one previously mentioned is the easiest.
Offline
Topic closed
Pages: 1