Rot - L1
Last updated
Last updated
'Rot' is one of our new words starting with the letter R that can help save Terra. When this button is clicked, get ready to learn more about this new 'R' and guess if the example corresponds to 'Rot' or not.
When the game starts we want to position the 'Rot' button at the top left side of the Stage.
When this sprite is clicked, we want it to ask a true or false question of your choice about the R word 'Rot' with a squeaky voice.
E.g. : R or Not? 'Rot' involves composting. Type 't' if true and 'f' if false.
Make sure to ask the player to write 't' for true and 'f' for false, otherwise the code will not be able to recognize the player's answer. For example, 'true', 'True', or 'T' will not be recognized.
When this sprite is clicked, your question in the last step will appear in a speech bubble and wait for the player to write their answer in a box.
This step is packed with blocks, but do not panic, it will all make sense
All the following blocks are placed below the blocks of the last step and they have two tasks in the game:
Determine if the player got the correct answer or not
Reveal the appropriate message depending on the player's answer
You get to choose what messages you want to appear depending on the player's answer!
The orange block, named the 'if else' block, checks if the player's answer is 't' (true). If yes, only the blocks of code above the 'else' will run. If no, only the blocks of code under the 'else' will run.
The last empty 'say' block allows us to erase the speech bubble after the speech
The 'Rot' button is ready to go! In the next section, we will create the 'Rethink' button.
The Professor, Achievement. Describe to yourself or a friend what each block does
Note that all images for step for the three sprite buttons assume that 't' (true) is always the good answer, but you could twist things up! If 'true' is the wrong answer, you could write your message when the answer is incorrect in the first part. Then, you would write the message when the answer is correct in the second part, below the 'else.'