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

#1 2007-05-24 08:56:35

shadowhalo3
Scratcher
Registered: 2007-05-22
Posts: 71

How do you make Barriers???

Im currently working on a project, and i would to know how to set barriers on places that the sprite should not be able to cross. For instance, a house, even if i did make it a sprite, my character sprite would still trample over the house as if it's a door mat. please help.


Check out my projects There the sickest thing on here. Just look up project Zero, or click my name, and be exposed to the future of scratch Gaming. JUST FINISHED GUITAR HERO: PLATINUM http://scratch.mit.edu/projects/shadowhalo3/90280

Offline

 

#2 2007-05-24 09:14:21

pedroskivich
Scratcher
Registered: 2007-05-21
Posts: 72

Re: How do you make Barriers???

In one of my games I made I have barriers. They are just dark grey draw on the background. I used this script for my person sprite one.

When green flag clicked
     Forever if sensing color dark grey
           Turn 180 degrees move ten steps.     

Whenever sprite one hit grey he turned around and took 10 steps. It worked well.

Offline

 

#3 2007-05-24 09:25:47

Duncan
Scratcher
Registered: 2007-05-15
Posts: 47

Re: How do you make Barriers???

Or use:

  If touching HouseSprite
  Turn 180 degrees move ten steps

to detect if it has hit a sprite called HouseSprite

Offline

 

Board footer