Voxel Game Maker

Docs Cookbook

Coins and a score

Place a coin. What is it? ▸ Pickup, Type Coin, and its Worth (a gold coin worth 5).

#Without code

  1. Place a coin. What is it? ▸ Pickup, Type Coin, and its Worth (a gold coin worth 5).
  2. Coins are Counted on screen by themselves.
  3. For a score too: the coin's Rule (Advanced Trigger) When touches it, Then Add to counter (Counter score, Add 10).
  4. Show it with Show text on screen: Score: {score} (see Collectible counter on the HUD).

#Quick code

Where it goes: on the coin, Event: Player touches / steps on it.

give("Coin")
score = score + 10
play("blip")
self.remove()