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

#1 2008-04-27 09:57:16

kazzag78
Scratcher
Registered: 2008-04-27
Posts: 5

Multiple Choice Scoring System

can anyone advise how to create a score for a multiple choice game?  I can set the score variable up but I want it to change when someone clicks on the right answer out of a choice of three?

Thanks  smile

Offline

 

#2 2008-04-27 10:09:28

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

Re: Multiple Choice Scoring System

I assume you are going to have more than one question that needs to be answered.  Somehow you need to keep track of which question is being asked, either with a variable or by looking at the costume that the sprite that is showing the question is using (assuming you are using a sprite costume to show the question).

Then, assuming you have a separate sprite for each of the possible answers, you just need to set up a script that only changes the score when that answer is selected for the correct questions.

So, for example, let's pretend that you used a variable to keep track of the question being asked, the variable is called "Question Number" and it gets changed every time the question changes.  Then the script on one of the answer sprites might look like:

When "Answer Sprite 1" Clicked
if "Question Number" = 2 OR "Question Number" = 5
     Change "Score" by 1
Else
     Change "Score by -1

You will notice that I have added a penalty (you lose points) if a wrong answer is choosen, that is optional.  In the above example, the first sprite is the correct answer only for questions 2 and 5.  This of course can be extended by using more OR blocks.

Hopefully you find this helpful.

Last edited by Paddle2See (2008-04-27 10:10:22)


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

Offline

 

#3 2008-04-27 10:17:05

kazzag78
Scratcher
Registered: 2008-04-27
Posts: 5

Re: Multiple Choice Scoring System

thanks, yes that really helps!!! I've been looking at it for days trying to think how to do it and now it's clear  smile

Offline

 

Board footer