Look at a platformer base and download it.
Here is an example: http://scratch.mit.edu/projects/Vortex_/2902627
Offline
I assume you mean the problem where a ball moves a larger number of steps than the thickness of the line, and thus passes through it?
It can be annoying, but one of the most reliable methods is to convert move (x) steps into individual single steps.
Thusly:
when gf clicked forever if <not <touching [ground]?>> move (10) steps endBecomes:
when gf clicked forever if <not <touching [ground]?>> move (1) steps if <not <touching [ground]?>> move (1) steps if <not <touching [ground]?>> move (1) steps if <not <touching [ground]?>> move (1) steps if <not <touching [ground]?>> move (1) steps endIt takes more time to code it like that, but this way it checks every individual step on its path (it will still move at the same speed though, because all those steps are checked within the same frame).
Last edited by Kileymeister (2013-01-21 13:50:25)
Offline
I'm saying that when I press the arrow keys, the ball doesn't stop when it's hitting a wall and goes through. How do I get it to stop and disable its movement even when an arrow key is being pressed?
That said, thank you very much for your help.
Last edited by redragon (2013-01-21 14:00:24)
Offline
redragon wrote:
I'm saying that when I press the arrow keys, the ball doesn't stop when it's hitting a wall and goes through. How do I get it to stop and disable its movement even when an arrow key is being pressed?
That said, thank you very much for your help.
Well, there are a few ways, though before I show you, could I see you scripts so that I could get you the best answer?
Offline
I cant show you my scripts. Sorry. There is some code in there that I dont know how to write. Plus, it is VERY long. Do you have any tips that might be able to help me?
Thanks for helping,
- Redragon
Offline