Counter

From Wiki of ZZT
Jump to navigation Jump to search

This article is about numerical counters representing the player's state. For the element with the ZZT-OOP name "counter," see conveyor.

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.

Bugs/Quirks

TODO: Document the consequences of the counter being a signed 16-bit value?