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

#1 2012-05-31 22:02:42

ZebraCrazy122
New Scratcher
Registered: 2012-05-16
Posts: 6

How do you stop a spirit from going into a certain area?

For example, in pacman you can move the around the game with the arrow keys but cannot go into or past the walls, you have to go around them. Is there any way to make it so the spirit can not go on top of the walls only through it? Do I have to make the walls, there own spirits or can i just make it that it cannot touch different parts of the wall? Thank you.

Offline

 

#2 2012-05-31 22:13:44

wasabi56
Scratcher
Registered: 2012-02-10
Posts: 500+

Re: How do you stop a spirit from going into a certain area?

ZebraCrazy122 wrote:

For example, in pacman you can move the around the game with the arrow keys but cannot go into or past the walls, you have to go around them. Is there any way to make it so the spirit can not go on top of the walls only through it? Do I have to make the walls, there own spirits or can i just make it that it cannot touch different parts of the wall? Thank you.

when gf clicked
forever
if<touching color [color of wall]?>
point in direction <<direction>+(180)>
end
this should work  smile


http://i.picasion.com/pic58/c23d4d2fc75f459dcf3d9ebf3e8ba395.gif
http://www.weebly.com/uploads/1/0/1/4/10146167/2294523_orig.png

Offline

 

#3 2012-05-31 22:15:47

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: How do you stop a spirit from going into a certain area?

Btw, the word is "sprite", not "spirit".


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

Board footer