this is how to make a 1script 1sprite platformer (no velocity)
when green flag clicked:
forever:
if: (key (right) pressed)
change x by (5)
if: (key (left) pressed)
change x by (-5)
if: (key (up) pressed)
repeat (50) times:
change y by (1)
if: (key (left) pressed)
change x by (-5)
if: (key (right) pressed)
change x by (5)
if (not (touching color (color of platform)))
repeat until (touching (color of platform))
change y by (5)
if: (key (left) pressed)
change x by (-5)
if: (key (right) pressed)
change x by (5)
if: (not (touching color (color of platform)))
repeat until (touching (color of platform))
change y by (5)
if: (key (left) pressed)
change x by (-5)
if: (key (right) pressed)
change x by (5)
sorry if it is unclear.
if you want, here's a link:
http://scratch.mit.edu/projects/K-Jam/1686068
Offline
Thank you, this was very helpful!
Offline
Too bad there is no wall detection. Good for basic platformers though. Personally, I don't make platformers without wall detection, because I believe they are an essential part of a platformer.
Having said that, I have seen some good platformers without walls.
Offline