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

#1 2011-07-25 12:38:25

sabaspeedy55
New Scratcher
Registered: 2011-07-25
Posts: 4

Having troubles with my blocks in my game need help.

http://scratch.mit.edu/projects/sabaspeedy55/1942955
I made a game called Brick Breaker, where I have a board and I have to hit a ball and break some bricks. But I am having some troubles because when I hit the ball and touches the brick, the brick is supposed to disapear but at times it doesn't disapear. It just stays there, even when my script say's for it to disapear when touching ball. Also another problem arose when I was ttrying to fix my first problem that I didn't see was happening. When the ball goes above the brick it, when coming down it shoots straight down without even bouncing back up. I tried fixing that problem by putting a script on the ball that when touching the inside color of the brick to bounce up. But that didn't exactly work because the ball then started to go through the bricks when my script says to bounce above it or bounce below it. I need help in fixing so can you please try to fix my game.

Offline

 

#2 2011-07-27 12:01:59

sabaspeedy55
New Scratcher
Registered: 2011-07-25
Posts: 4

Re: Having troubles with my blocks in my game need help.

Bump

Offline

 

#3 2011-07-27 14:01:04

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Having troubles with my blocks in my game need help.

i'll have a look...


http://i.imgur.com/1QqnHxQ.png

Offline

 

#4 2011-07-28 01:54:45

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Having troubles with my blocks in my game need help.

TRocket wrote:

i'll have a look...

seems to be woking fine?


http://i.imgur.com/1QqnHxQ.png

Offline

 

#5 2011-07-28 02:21:19

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

Re: Having troubles with my blocks in my game need help.

The ball bouncing and the brick staying is because the scripts are in two different sprites, I think it's the same reason the ball sometimes goes through the brick.  Sometimes the ball will sense it's touching the brick and turn around before the brick knows the ball is there, and vise versa for the ball going through the block.  Try putting the entire script into each block, instead of in the ball and block.

Like delete the script in the ball sprite to turn around when touching the color orange and in your script that tells the blocks that when they're touching the ball to disappear add <broadcast[ turn around ]>

then give the ball the hat block

<when I receive[ turn around ]>

and then program in the blocks that you usually use to make the ball change direction when the ball hits your blocks.

I hope this helps (:


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

Offline

 

#6 2011-07-28 12:39:22

sabaspeedy55
New Scratcher
Registered: 2011-07-25
Posts: 4

Re: Having troubles with my blocks in my game need help.

I tried what you said to do, to make a broadcast and put each one of the blocks to broadcast the turn around for the ball to turn around. But when I tried this It was completely working until there were two blocks that would not disapear. The ball would go right through the block.
     So I checked out the two blocks and it had the same exact scripts as a working block. So I tried again because I thought it would've been a glitch or something. But when I tried it again two different blocks didn't disapear. The same thing happened when I did it again. I checked my variables and saw that everything was okay. I really don't know why this is happening so if you have any ideas of why this is happening please tell me.

Offline

 

#7 2011-08-02 12:09:51

sabaspeedy55
New Scratcher
Registered: 2011-07-25
Posts: 4

Re: Having troubles with my blocks in my game need help.

bump

Offline

 

Board footer