3. In the code for the start button, use the When Green Flag Clicked block and the Show block so that the button will
always appear at the start of the game.
4. Add the When This Sprite Clicked event block, the Switch Backdrop To () block, and the Hide block. Set the Switch
Backdrop To () block to match the name of your first question backdrop. This will make it so that clicking the start
button will cause the game to advance and the start button to disappear once the questions begin.
Part 3: Answer Option Sprites
1. Create as many new sprites as needed to represent the options to be sorted in each question. There should be two
items in each question. You can design your own sprites using the paint editor, upload your own sprites, or choose
from the predesigned sprites.
2. In all answer option sprites, add the When Green Flag Clicked block and the Hide block so that the sprites do not
immediately appear at the start of the game and can later be triggered to only appear at the appropriate question.
3. For each answer option sprite, use the When Backdrop Switches To () and set to the appropriate backdrop for that
question. Underneath, add:
a. The Show block so that the sprite will appear at the appropriate question.
b. The Set Drag Mode () block and assign to “draggable”. This will allow the player to be able to click and drag
the sprites without stopping the program entirely.
c. The Go To X () Y () block and set the coordinates to a starting position that is not on top of the coloured
squares.
4. For just one of the sprites in each pair (i.e., if the options for Question 1 are Salt and a Salad, then choose just Salt
or Salad), continue on with the sequence of code outlined in the previous step by adding the following:
a. Use the Wait Until () block and add a Key () Pressed? sensing block inside. Choose the desired keyboard
key (i.e., spacebar). This will allow users the time to click and drag the sprites to the correct position and
then press a key to trigger the game to “check” their answers.
b. Add two If () Then blocks one after the other. Add the Touching Colour ()? sensing block to each conditional
and click on the colour that is preloaded. Use the colour picker button to select the colour from the preview
screen rather than trying to manually set to the same colour.
c. Inside each If () Then block, add a Broadcast () block. For the conditional that matches the correct answer
(i.e., the correct answer is to drag that sprite to the blue box onscreen rather than to the red), set a relevant
message name like “CorrectQ1”. For the conditional that matches the incorrect answer, choose a message
name like “IncorrectQ2”. Be sure to name these messages clearly, as they will be very important in Part 4.
5. For each answer option sprite, add a When Backdrop Switches To () event block and set it to the backdrop that will
come next (i.e., if working on the sprites for question 1, then set to backdrop name for question 2). Add a Hide block
so that this sprite will disappear upon the question beginning.
Part 4: Evaluate Correct/Incorrect Response
1. Inside of the area for the stage, add the following code for the correct answer for each question:
a. Add the When I Receive () block and set to the relevant message for the correct answer for that question
(i.e., “Q1Correct)
b. Add the Ask () and Wait block. Inside the text bubble, add a message to the player to tell them they are
correct, as well as a keyword for how to advance (i.e., “Type ‘next’ to move on to the next question”).
c. Add an If () Then block and layer in the () = () operator block. Inside the first blank space, add the Answer
variable. In the second blank space, add whatever the keyword you chose in the previous step (i.e., “Next”).
This will make it so that the player can only move on once they have typed the keyword.
d. Inside the If () Then block, add the Switch Backdrop To () block and set to the next question backdrop.
2. Use same code as in the previous step for the incorrect answer for each question, but make two changes:
a. Change the message in the When I Receive () block to align with the message for the incorrect answer (i.e.,
“Q1Incorrect”).
b. Edit the response in the Ask () and Wait block to tell the player that they were incorrect.