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

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

NewToThis
Scratcher
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
Scratcher
Registered: 2008-01-29
Posts: 1000+

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-3-6.jpg

Offline

 

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

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

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


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2009-10-14 21:38:56

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Re: How Do you make a solid wall?

Making a wall can be as simple as putting in the script <if on edge, bounce>

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


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

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

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: How Do you make a solid wall?

This should be in All About Scratch


Hai.

Offline

 

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

Redboy2009
Scratcher
Registered: 2009-10-24
Posts: 6

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
Scratcher
Registered: 2009-10-03
Posts: 21

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 ghost 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 ghost 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.

Last edited by ilikewaffles (2010-01-07 12:55:38)


(Diner of the Dead) zombies and rock and roll always blend in together...

Offline

 

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

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

Re: How Do you make a solid wall?

http://scratch.mit.edu/forums/viewtopic.php?id=23583#req_message

Offline

 

#9 2009-11-06 23:44:21

tylerscheller
Scratcher
Registered: 2009-03-22
Posts: 9

Re: How Do you make a solid wall?

just put <if><touching[ sprite whatever <stop script> then itll stop u when touching that sprite best working one yet

Offline

 

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

alex_flower
Scratcher
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
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: How Do you make a solid wall?

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


I am Back!

Offline

 

#12 2009-12-12 12:34:37

tylerscheller
Scratcher
Registered: 2009-03-22
Posts: 9

Re: How Do you make a solid wall?

new script this one woprks best
<if><touching[ wall<change y by( 0

Offline

 

#13 2010-04-04 21:35:27

blackthunder
Scratcher
Registered: 2010-04-04
Posts: 14

Re: How Do you make a solid wall?

Inside the forever mouth, put 'if touching...put the name of the block(spirit) you want to be the wall, then put set y velocity to 1, then put under it (but still inside the forever) change y velocity by -1, then underneath it (but, of course, inside the forever) put change y by y velocity.

Offline

 

#14 2010-05-26 02:41:20

Jakelsm
Scratcher
Registered: 2008-01-01
Posts: 4

Re: How Do you make a solid wall?

I know how to make sensors! Go to my project...
http://scratch.mit.edu/projects/Jakelsm/1074982
I hope it helps!  big_smile

Last edited by Jakelsm (2010-05-26 02:41:40)

Offline

 

#15 2010-05-26 12:05:46

06dknibbs
Scratcher
Registered: 2008-01-29
Posts: 1000+

Re: How Do you make a solid wall?

Looks like a very old bumped thread before everyone rushes in here x)

Although it's still on topic, and other members probably need help with a simular problem  smile


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-3-6.jpg

Offline

 

#16 2010-05-30 05:32:28

helltank
Scratcher
Registered: 2010-05-21
Posts: 1000+

Re: How Do you make a solid wall?

Try:
When green flag clicked
Forever
if
touching [left wall colour]
change y by -[how far you want the sprite to bounce back]

do the same for the right wall, but remove the minus sign.


Error:Signature could not load. Please wait for an indefinite amount of time, until you realize you're gullible and go off to look for another potentially interesting signature to stare at.

Offline

 

#17 2010-07-17 09:02:56

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: How Do you make a solid wall?

Look at this: http://scratch.mit.edu/projects/MoreGamesNow/848288 It may not be exactly what you're looking for for a basketball game, but it may help. Just download it and look at the script


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#18 2010-08-09 10:01:41

jakedaniel
New Scratcher
Registered: 2010-07-30
Posts: 1

Re: How Do you make a solid wall?

how do you create a solid wall when a sprite runs into it but also how do you make a sprite stand on top of the ground and not sink into it

Offline

 

#19 2010-10-09 11:15:07

scarierboo
New Scratcher
Registered: 2010-08-25
Posts: 2

Re: How Do you make a solid wall?

i'm wondering that too!

Offline

 

#20 2010-10-09 12:34:52

FlexiStudio
Scratcher
Registered: 2010-02-28
Posts: 1000+

Re: How Do you make a solid wall?

Looks like everyone else stole my post  sad
Good luck with your Basketball project anyways and post a topic on the 'Show And Tell' Forums so we can all see it!


Hey I'm back!-
FlexiStudio

Offline

 

#21 2010-10-24 12:24:49

Twe2001
Scratcher
Registered: 2010-08-22
Posts: 1

Re: How Do you make a solid wall?

I am so stuck. Im making a game called ghost kid but i don't have a clue how to make a wall. HELLP ME HELP ME

Offline

 

#22 2010-10-26 18:01:56

GraemeK
Scratcher
Registered: 2010-06-14
Posts: 73

Re: How Do you make a solid wall?

Perhaps this is what you are looking for?
http://scratchr.webs.com/images/bouncewall.gif
(You can take out the -if on edge, bounce- block if it is not required.)

Last edited by GraemeK (2010-10-26 18:02:19)


http://internetometer.com/image/13865.png

Offline

 

Board footer