Counter

From Wiki of ZZT
Revision as of 13:02, 24 December 2025 by Asie (talk | contribs) (Created page with "A counter is a numeric value that can be manipulated in ZZT-OOP using the #give and #take commands. ZZT provides six counters: * '''health''' - the player's health, * '''ammo''' - the number of ammunition held by the player, * '''gems''' - the number of gems held by the player, * '''torches''' - the number of torches held by the player, * '''score''' - the player's total score, * '''time''' - the ''elapsed''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A counter is a numeric value that can be manipulated in ZZT-OOP using the #give and #take commands.

ZZT provides six counters:

  • health - the player's health,
  • ammo - the number of ammunition held by the player,
  • gems - the number of gems held by the player,
  • torches - the number of torches held by the player,
  • score - the player's total score,
  • time - the elapsed time on the board, if the board has a time limit. Not used if the board does not have a time limit.

Other than time, which is specific to the current board and reset on every entry, each counter's value is persistent throughout the entire world.