The shy ghost
ChallengeChanging how it looks
This slime is shy. It wants to hide when the hero is near. But its two numbers are the wrong way round. Your job is to fix them.
What should happen
When the script is right, the game goes like this.
- The game starts. The slime stands still. You can see it clearly.
- The hero walks toward the slime. The slime sees him and fades, so it is hard to see.
- The hero walks away again. The slime loses sight of him and comes back, as solid as before.
What happens now
The slime does the opposite. It stays solid when it sees the hero, and fades when he has gone.
How to fix it
Remember: an opacity of 100 is solid, and a small number is faded.
- Look at the top left of the code box. Press Blocks
. - Find the block under when I see the Hero. It says my opacity is 100.
- Click the number 100, in its white bubble. Type 20.
- Find the block under when I lose the Hero. It says my opacity is 20.
- Click the number 20. Type 100.
Test it
- Press Play
, under the little game. - Click the little game, so the arrow keys work.
- Hold the right arrow key to walk the hero toward the slime. Stop a block or two away, and wait for 2 seconds. The first goal is checked.
- Hold the left arrow key to walk the hero back to where he began, and wait for 2 seconds. The second goal is checked.
| If this goal has a cross | What to change |
|---|---|
| The ghost fades when it sees the hero | The number under when I see the Hero must be under 50. |
| The ghost comes back when the hero has gone | The number under when I lose the Hero must be 100. |
Press Stop
, change a number, and press Play again. Have as many goes as you like.

