Angrier each time
ChallengeStart your game
This slime should lose its temper. But however many times you hit it, it stays calm. Your job is to find the number that is wrong.
What should happen
When the script is right, the game goes like this.
- The game starts. The slime stands still.
- The hero hits the slime. It says "That is 1!" and stays calm.
- The hero hits it again. It says "That is 2!" Now it is angry: it speeds up and chases the hero.
What happens now
The slime counts its hits, but it never gets angry.
Look at the line if @hits is over 5. The slime only takes 5 hits, so @hits can never be over 5. The answer is always no.
How to fix it
The slime must get angry on its second hit. So the question should be: is @hits over 1?
- Look at the top left of the code box. Press Blocks
. - Find the if block. It says @hits is over 5.
- Click the number 5, in its white bubble. Type 1.
Test it
- Press Play
, under the little game. - Click the little game, so the keys work.
- Hold the right arrow key to walk the hero up to the slime. Stop about one block away.
- Press the X key to swing the sword. Then press it again.
The goals are checked just after the second hit.
| If this happens | What to change |
|---|---|
| The slime is fast after 2 hits has a cross | The number is still too big. It must be 1. |
| No goal is checked | The slime must be hit twice. If it chases you after one hit, the number is too small. |

