This article is a stub.
Notes on Counters
Unlike ZZT, JZT does not have any concept of flags. Instead, one can create an arbitrary amount of named counters, which can act as ZZT-like flags as desired. This means that the expressions
set flag are
set 1 flag equivalent.
Counters can be given maximum values by creating a new counter with
_max appended to the counter name. For instance
set 100 health_max would set your maximum health to 100, and
set 50 flag_max would set the maximum value of the
flag counter to 50. To remove the maximum value from a counter, simply set it back to zero. For example,
set 0 ammo_max would remove the ammo cap, if it existed.
_max attribute can apply recursively. For instance,
set 1000 health_max_max would set the maximum value of
health_max to 1000.
In addition to the standard built-in ZZT counters, there is a built-in counter named
Keys can be accessed as JZTScript counters with names in the form of
KEY+[color code], where the color code is a hex value between 9 and F. For example,
set key9 would give the player a blue key.