Hi, I have been working on a platform style game as part of my school project which also uses scroll y and velocity/jumping. I have been quite successful so far but seem to have hit a bit of a problem. When my sprite falls down, he ends up going through the platforms rather than landing on them. Any ideas on how I could edit my scripts or add scripts to stop this from happening. I have been reading up about sensors but not too sure if this would be solution. Any help would be much appreciated.
The link to the game is :
http://scratch.mit.edu/projects/qprmanharvey/2856912
Many thanks!
Offline
The platforms are black (so the player takes damage when touching them) and the color detection at the bottom of the scripts is looking for the wrong color.
when gf clicked set [Y Velocity v] to [0] forever if <key [up arrow v] pressed?> set [Y Velocity v] to [4] change y by (Y Velocity) repeat until <touching color [#00CE42]?> change y by (Y Velocity) change [Y Velocity v] by (-0.2) end set [Y Velocity v] to [0] end if <touching color [#00CE42]?> change y by (0) else change y by (-3) end if <touching color [#000001]?> reset timer move (-10) steps change [Health v] by (-1) end endYou'll either want to change the platforms to that color, or change the platform color and then change the colors in the script. The mismatched colors are the green ones.
Offline