Hi I'm new to Scratch and I am making a game that I'm really excited about!
I want to post it soon and show the world my creation!!!!
So um... Anyways. I have a problem making it... Most of the things that I want are pretty much covered but I need one thing to finish the job.
I have a sprite that is going to walk and jump around... but I want a blockage thing.
Like there is a wall in front of him that he can't go through unless he does something... I know how to make the wall go away when he does something to open it but the problem is he can still walk trough it no matter what he needs to do!!!
I need help PLZ!!!!!!
If you didn't quite understand what I just said I want a wall to block a sprite from going through.
Thanks!
DK
Offline
Whatever routine you are using to make your sprite walk forward, put in an "if" statement (using a sensor) that stops the walk-forward script from working if the sprite is touching the blockage.
EG:
When Up Arrow pressed
If NOT (touching sprite "Block"), move 10.
Last edited by Mayhem (2008-10-17 12:52:20)
Offline
If you want a more general-purpose solid walls technique - this one is pretty bullet proof:
http://scratch.mit.edu/projects/Paddle2SeeFixIt/188825
Offline