Voxel Game Maker

Docs Cookbook

Collectible counter on the HUD

HUD tab ▸ Add ▸ Library ▸ Item counter (or Collect goal).

#Without code

  1. HUD tab ▸ Add ▸ Library ▸ Item counter (or Collect goal).
  2. In its Text, {Coin} shows how many coins the player has: Coins: {Coin}.
  3. Other values: {score}, {money}, any variable, counter or timer.
  4. Or, without a HUD: a Rule When the player enters the world, Then Show text on screen Coins: {Coin}.

#Quick code

Where it goes: a level script, Event: Player enters the world.

hud_text("coins", "Coins: {Coin}", "top_right")