Voxel Game Maker

Docs Cookbook

Growing crops

Place the crop. Add Grows: Looks like when planted (empty = small), Looks like half grown (empty = the sprout)

#Without code

  1. Place the crop. Add Grows: Looks like when planted (empty = small), Looks like half grown (empty = the sprout) and Grown in (minutes of play; 0 = use days).
  2. Add Harvestable with Gives (item = how many); with Grows it can only be picked when grown.
  3. Tick Grows again after it's picked for a crop that comes back.

#Quick code

Where it goes: on a seller, Event: Player presses E.

local n = has("Carrot")
if n > 0 then
  take("Carrot", n)
  give("Coin", n * 3)
  popup("Sold " .. n .. " carrots.")
end