Voxel Game Maker

Docs Cookbook

Breakable crate

Place the crate. What is it? ▸ Breakable: smash it with a weapon.

#Without code

  1. Place the crate. What is it? ▸ Breakable: smash it with a weapon.
  2. List what it drops (Advanced: Drops loot, item, how many and its chance).
  3. In Advanced, Health / breakable: Health, Hit sound, Destroyed sound; Needs tool for crates only an axe opens.
  4. Breaks apart: its How (explode, crumble, shatter…).

#Quick code

Where it goes: on the crate, Event: It is destroyed.

particles("explosion")
if chance(30) then
  spawn("Heart", self.x, self.y, self.z)
end