You are not logged in.
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
Offline
Making a wall can be as simple as putting in the script
but if you want to make a sprite that acts as a wall, or a color on the background that acts as a wall you have to make a more complicated script.. an example i think would be if you want a ball to bounce off of a paddle, you program into the script so that when it touches the paddle, it moves into the opposite direction, or bounces off of the paddle like light bounces off of a mirror
Offline
This should be in All About Scratch
Offline
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
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>
here the colour of one side of the square
colour of the wall.
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>
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
Offline
Thanks to all of you this information is very useful.
Offline