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

#1 2008-12-08 15:47:59

bman207
Scratcher
Registered: 2007-05-25
Posts: 5

Costume Changing Glitch.

Hi,

It's been a very long time since I've used Scratch, so I'm a little rusty.  smile

For school, I created a quiz that students can take after the presentation. I posted a glitched version online: http://scratch.mit.edu/projects/bman207/345397

I have the question box changes costumes after each question. It was working perfectly, until now.

My grade kind of depends on this, so please help me out.

Offline

 

#2 2008-12-08 16:00:25

bman207
Scratcher
Registered: 2007-05-25
Posts: 5

Re: Costume Changing Glitch.

Quick update.

To solve the problem I decided to set the costume to three after costume 1 (also question 1). However, as a result it refused to move on to question 2 and simply stopped working. For some reason It doesn't want to show costume 3...

Once again, I need some fast help.  smile

Offline

 

#3 2008-12-08 16:00:48

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Costume Changing Glitch.

bman207 wrote:

Hi,

It's been a very long time since I've used Scratch, so I'm a little rusty.  smile

For school, I created a quiz that students can take after the presentation. I posted a glitched version online: http://scratch.mit.edu/projects/bman207/345397

I have the question box changes costumes after each question. It was working perfectly, until now.

My grade kind of depends on this, so please help me out.

You need to add in a:

<wait until><<  <not> <mouse down?> >>

after every When (sprite) clicked.


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#4 2008-12-08 23:03:40

bman207
Scratcher
Registered: 2007-05-25
Posts: 5

Re: Costume Changing Glitch.

Didn't work!

I made it:

When Sprite4 Clicked
if Question# = 1
change Question# by 1
change Score by 1                    // NOTE: only for correct answers.
Wait Until Not Mouse Down       // NOTE: this is what I added.

I'm almost out of time.

Offline

 

#5 2008-12-08 23:06:23

bman207
Scratcher
Registered: 2007-05-25
Posts: 5

Re: Costume Changing Glitch.

Ok, I moved the last line up to make it the 2nd line. Still nothing.

Offline

 

#6 2008-12-09 04:25:08

dimus
Scratcher
Registered: 2008-12-01
Posts: 7

Re: Costume Changing Glitch.

Troubles are because all scriptes "When Sprite Clicked" work independently of each other.
Try to make only one script "When Sprite Clicked". For exemple:

When Sprite3 Clicked
if Question#=1
|    do something
else
|   if Question#=2
|   |    do something
|   else
|   |  if Question#=3
etc.

One more solution: you need add small pause (0.5 sec, i think) before changing variable Question#

Last edited by dimus (2008-12-09 04:44:14)

Offline

 

#7 2008-12-09 04:38:04

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

Re: Costume Changing Glitch.

I think you shouldn't be changing the question number while the When Clicked events are still processing.  I simplified your logic so that there was only one script being run when the sprite is clicked and it works fine

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


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

Offline

 

Board footer