Voxel Game Maker

Docs Cookbook

Shop

Place the shopkeeper or a counter. Add the Shop behavior (Advanced: Items & shops).

#Without code

  1. Place the shopkeeper or a counter. Add the Shop behavior (Advanced: Items & shops).
  2. Shop name, and For sale, one per line: Potion = 5, Key = 20.
  3. It is paid with the money item (Items panel: Kind = Money), or set Paid with.
  4. Optional: tick Buys from the player too and set Pays (% of the price).

#Quick code

Where it goes: on any object, Event: Player presses E; the shop is on the object named Shopkeep.

open_shop("Shopkeep")

For a shop that asks a question first, see A shop with a question in the Quick Code Reference.