Counter: Difference between revisions
Jump to navigation
Jump to search
(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''...") |
No edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
<blockquote>''This article is about numerical counters representing the player's state. For the element with the ZZT-OOP name "counter," see [[conveyor]].''</blockquote> | |||
A counter is a numeric value that can be manipulated in [[ZZT-OOP]] using the [[Give|#give]] and [[Take|#take]] commands. | A counter is a numeric value that can be manipulated in [[ZZT-OOP]] using the [[Give|#give]] and [[Take|#take]] commands. | ||
| Line 11: | Line 13: | ||
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]]. | 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? | |||
{{ZZT-OOP navbox}} | {{ZZT-OOP navbox}} | ||
Latest revision as of 08:25, 26 December 2025
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?
| ZZT-OOP | |
|---|---|
| Prefixes |
|
| Messages | |
| Directions | |
| Flags | |
| Commands | |