Levels
Lv 26
Boss Rush 1
★
Score 3 in this challenge.
0
Score:
0
/ 3
Hint
Code
Run
Reset
1
2
3
4
5
6
7
8
9
10
11
12
13
14
hero = makeSprite("hero", 40, 200, { emoji: "🦸" }); boss = makeSprite("boss", 300, 300, { emoji: "👹", w: 60, h: 60, gravity: 0 }); boss.vx = 2.1; whenKey(" ", () => jump(hero)); onUpdate(() => { if (keyDown("arrowright")) hero.x += 3; if (keyDown("arrowleft")) hero.x -= 3; if (boss.x < 20 || boss.x > 320) boss.vx *= -1; boss.x += boss.vx; if (touching(hero, boss) && hero.vy > 0) { addScore(1); hero.vy = -10; } }); // Goal: hit the boss 3 times!
Game
← Prev
Next →