Scratch Forums

You are not logged in.

#1 2009-09-27 10:51:16

NewToThis
Member
Registered: 2009-09-27
Posts: 1

How Do you make a solid wall?

I really don't have a clue how to draw one and for my next project I want to make a basketball game so I want to know how to make a wall, anyone help me.

Offline

 

#2 2009-09-27 16:29:43

06dknibbs
Member
Registered: 2008-01-29
Posts: 903

Re: How Do you make a solid wall?

What sort of wall are you thinking of? One that the ball can bounce off or a background image etc:


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-5.jpg?t=1253916707
Don't know something about the forums? Try clicking here  smile

Offline

 

#3 2009-09-28 05:14:25

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 3451

Re: How Do you make a solid wall?

Bouncing off of objects can get pretty complicated.  I've got a simple pinball game you can look at that maybe would give you a good start...

http://scratch.mit.edu/projects/Paddle2SeeFixIt/681997


Treat others as you would like to be treated  smile

Offline

 

#5 2009-10-16 22:52:34

fg123
Member
Registered: 2008-11-13
Posts: 1310

Re: How Do you make a solid wall?

This should be in All About Scratch

Offline

 

#6 2009-10-30 21:49:53

Redboy2009
Member
Registered: 2009-10-24
Posts: 2

Re: How Do you make a solid wall?

NewToThis wrote:

I really don't have a clue how to draw one and for my next project I want to make a basketball game so I want to know how to make a wall, anyone help me.

i say you could make a video to make more people anser that Q.

Offline

 

#7 2009-10-30 22:46:43

ilikewaffles
Member
Registered: 2009-10-03
Posts: 3

Re: How Do you make a solid wall?

an easy way of making walls for your sprite to detect them is to make sensors.
you can make coloured sensors or separate sensors.


-------------------------------------------------------------------------------------------------------------------------
to make coloured sensors, draw a new sprite. it should look like a square. on each side of the square draw lines of different colours
then you should make the following scrips

blocks<if>   < not >  

   


color    here the colour of one side of the square     is over   colour of the wall. change x by   whatever you want your sprite to move if not touching the colour of the wall/blocks

repeat this with all of the colours of your square.

this scrips should make your square move only to the side you want if not touching the colour of the wall
now, tell the sprite you want to see moving to always go to the square sensor.

here an example of the colour sensing sprite
http://scratch.mit.edu/projects/ilikewaffles/739332
the sensor is hiden by seting its fade effect to 100 so you cant see it while playing, but the sprite of the man moving always goes to the sensor.



-------------------------------------------------------------------------------------------------------------------------
another way of making walls, similarly to the colour sensor, is the single sensor,
to make this type of sensor, you will need to draw 4 sprites, each one will be the sensor of one side of the sprite you want to see moving and acting with walls.

then, make the following scriptson each of the sensors:

blocks<if>   < not >   touching   here you put the walls sprite<change x by( whatever you want/blocks


for an exaple of this method, download this project
http://scratch.mit.edu/projects/ilikewaffles/711316
the sensors are again hiden by fade effect. in this example, there are x and y velocities so if you dont understand this, it is not nesesary to use, i mean you can use motion blocks instead. stick to the colour sensig method, its simpler and still works.


-------------------------------------------------------------------------------------------------------------------------

any doubts please let me know, i can help you improve your projects.

hope this was useful to you.

Offline

 

#8 2009-11-02 12:45:29

fweganeg
Member
Registered: 2009-11-02
Posts: 1

Re: How Do you make a solid wall?

Offline

 

#10 2009-11-09 08:10:47

alex_flower
Member
Registered: 2009-10-27
Posts: 4

Re: How Do you make a solid wall?

Thanks to all of you this information is very useful.

Offline

 

#11 2009-11-09 15:07:25

nxsupert
Member
Registered: 2009-07-26
Posts: 6

Re: How Do you make a solid wall?

Do you whant a 2d wall or a 3d wall ?  smile

Offline

 

Board footer