The level script
Try itThe boss and the ending
A level can have a script of its own. It does not belong to any character. It watches the whole level, and it can change the level.
This one keeps the room dark until the boss is beaten.
How to read it
| Rule | What the level does |
|---|---|
when any {Heroes} enters | Makes the room dark, as soon as the hero arrives. |
when the {Big Slime} is beaten | Turns the dark off, and shows a banner. |
{Big Slime} is an ID, like {Door} in the last chapter. It points at the enemy with that name.
Try it
- Press Play
, under the little game. The room is dark. - Click the little game, so the keys work.
- Walk the hero up to the slime. Stop about one block away.
- Press X to swing the sword. This slime only takes one hit.
The light comes back, and the banner shows.
Give it to your level
- Press Copy
, at the bottom of the script in the code box above. - Press Open your game here, in the builder below, and go to level 3.
- Press the Map button
, under the map. - At the bottom of the level's settings, press Level script.
- Press Code
, and paste the script in. Press Save
.
This section ticks itself when you press Play
in the code box.

