Fade away
Try itChanging how it looks
This slime wants to be a ghost. A good ghost can fade away, so let us start there.
Press Play
Press Play
and watch. The slime fades until you can nearly see through it. It waits. Then it fades back in.
| Line | What it does |
|---|---|
my opacity is 20 slowly | Fades the slime out, down to 20. |
wait 2 seconds | Gives the fade time to finish. |
my opacity is 100 slowly | Fades it back in, up to 100. |
Why the wait is there
A slow change does not hold up the script. The slime starts to fade and goes straight on to the next line. Without the wait, it would start to fade back in before it had faded out.
Try some more
Press Blocks
, at the top left of the code box. There you can type any number.
| Try this | What happens |
|---|---|
| The first number as 0 | The slime fades away to nothing. |
| The first number as 60 | It only fades a little. |
| Take a look in Code | The same numbers are in the words. |
This section ticks itself when you press Play
.

