This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-11-22 21:21:20

ScratchX
Scratcher
Registered: 2009-05-05
Posts: 1000+

How Do You Make a Sprite Stop When Touching a Wall?

How do you make a sprite stop when touching a wall. I mean like when you are scrolling and there are platforms. How do you make your sprite stop immediatly when it is touching a platform or wall? I want it to be like m44's ChopShop. That what i mean by scrolling and stopping.
Thanks for helping! This is going to be used for my game NinjaX

Please post a project showing me how to do this or just post the scripts here!(i recomend you dont post scripts because i think there might be too many scripts to post and it could get confusing.)

Last edited by ScratchX (2009-11-22 21:21:38)


Happy New Year!
http://i45.tinypic.com/1nyasi.pnghttp://i50.tinypic.com/219pez8.pnghttp://i49.tinypic.com/e5s4zr.pnghttp://i48.tinypic.com/23l18hf.jpghttp://i49.tinypic.com/66zymu.png

Offline

 

#2 2009-11-23 14:28:59

Mitch99
Scratcher
Registered: 2009-05-15
Posts: 51

Re: How Do You Make a Sprite Stop When Touching a Wall?

why don't you just download "Chop Shop" and give credit for the code.

this one did well http://scratch.mit.edu/projects/RHY3756547/715593

it's rather simple, assuming your using the ScrollX method, just put
if touching (Insert Sprite Name)
[Motion] change X[or]Y by -1

Last edited by Mitch99 (2009-11-23 14:31:40)

Offline

 

#3 2009-11-23 14:46:45

ScratchX
Scratcher
Registered: 2009-05-05
Posts: 1000+

Re: How Do You Make a Sprite Stop When Touching a Wall?

Mitch99 wrote:

why don't you just download "Chop Shop" and give credit for the code.

this one did well http://scratch.mit.edu/projects/RHY3756547/715593

it's rather simple, assuming your using the ScrollX method, just put
if touching (Insert Sprite Name)
[Motion] change X[or]Y by -1

hehe i did download it and i looked at the code to see if i could recreate it so its like my way but so far not working out and when i copied the code it still didnt work out so im kinda confused


Happy New Year!
http://i45.tinypic.com/1nyasi.pnghttp://i50.tinypic.com/219pez8.pnghttp://i49.tinypic.com/e5s4zr.pnghttp://i48.tinypic.com/23l18hf.jpghttp://i49.tinypic.com/66zymu.png

Offline

 

Board footer