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

#1 2012-07-19 16:51:46

RosemountE
Scratcher
Registered: 2010-08-03
Posts: 2

Debugging help

Working on a pong game. Trying to get a second level to happen with a broadcast. For seome reason ball2 acts strangely when you get there and I can't figure it out. Posted it at http://scratch.mit.edu/projects/RosemountE/2685111

Offline

 

#2 2012-07-19 18:40:28

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Debugging help

Your problem is under the first ball:

When gf clicked
forever if <(Score)=(22)>
  broadcast [level 2 v]
You need to add in a
stop script
after the broadcast, because it's continually broadcasting that message and so level 2 is constantly resetting itself.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2012-07-19 18:56:44

Appletini
New Scratcher
Registered: 2012-07-18
Posts: 23

Re: Debugging help

Changing the script to this would also work.

when flag clicked
wait until <(Score) = (22)>
broadcast [level 2 v]
The script would stop itself.  wink

Offline

 

#4 2012-07-20 11:38:34

RosemountE
Scratcher
Registered: 2010-08-03
Posts: 2

Re: Debugging help

Excellent thanks...

Offline

 

Board footer