Voxel Game Maker

Docs Cookbook

Chest with loot

Place a chest. Add Chest / container.

#Without code

  1. Place a chest. Add Chest / container.
  2. Gives (item = how many), one per line: Coin = 5.
  3. Optional: Needs item (empty = none), Uses up the item, Locked message and Looks like when open.

#Quick code

Where it goes: on the chest, Event: Player presses E, with a random prize.

give("Coin", rand(3, 8))
if chance(20) then give("Ruby") popup("A ruby!") end
play("creak")
self.remove()