Beat your boss
ChallengeThe boss and the ending
This is the last challenge. Play your boss level, beat your boss, and win your game.
It is in your own game, and your game checks it with a test.
What should happen
- The hero walks into the boss room. The room goes dark.
- The boss sees the hero and attacks.
- The hero hits the boss again and again. After a few hits, the boss gets angry.
- The boss is beaten. The room lights up.
- The banner shows, and the game is won.
How to change the tests
Your old tests were for level 1 and level 2. They can not run in the boss room, so they have to go. The sections they belonged to keep their ticks.
- Press Open your game here, in the builder below.
- Press the Game button
, under the map. In Game Settings, find Scripts and press Tests
. - Press Code
. Take out all the old tests, so the script is empty. - Type these two lines.
when the {Big Slime} is beaten
test "The hero beat the boss" if the {Hero} health is over 0- Press Save
.
If your boss has another ID, use that name in the test.
Test it
- In the builder, go to level 3 and press Play
, under the map. - Fight your boss. Swing with X, and keep out of its way.
- When the boss is beaten, look at the Test results drawer. Your test should have a tick.
- Look under the builder. It should say that your test passed.
| If this happens | What to do |
|---|---|
| The boss is too hard | It is your boss. Give it fewer hits, or make it angry later. |
| The boss is too easy | Give it more hits, or make it angry sooner. |
| The test has no tick | Check that the name in the test is the same as your boss's ID. |
| The room does not light up | Check the name in the level script too. |

