Voxel Game Maker

Docs Cookbook

Boss with phases

Make a chasing enemy (above). On its Moves, press Make it a boss (adds the Boss behavior: a bar with its name, a banner, the arena closing, its own…

#Without code

  1. Make a chasing enemy (above). On its Moves, press Make it a boss (adds the Boss behavior: a bar with its name, a banner, the arena closing, its own music).
  2. In Advanced, Chase player ▸ Phases: what changes as its health drops.
  3. React to a phase: a Trigger with When it enters a phase (2), Then Show banner, Shake screen, Change music.
  4. Or When its health drops below… (50%) for one moment, such as Spawn object helpers.
  5. On the boss, When it is destroyed: Set switch boss_beaten (doors can open with it).

#Quick code

Where it goes: on the boss, Event: Player enters the world.

on_health(50, function()
  banner("Now I'm angry!")
  self.tint("red")
  self.use_move("Slam")
end)
on("phase", function(n) shake(0.25, 0.6) end)
on("destroyed", function() set_switch("boss_beaten") end)

The longer version is in the Quick Code Reference: A boss with phases.