Gem: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(Created page with "{{Element |zzt-oop name=gem |id={{Byte|7}} |char={{CharSwatch|4}} |category=item |stats=no |destructible=yes |effect on movement=pushable, squishable |uses zzt-oop color=yes }...")
 
m (Described 3 other possible uses of gems, all of which I've seen implemented.)
 
Line 14: Line 14:
Collecting a gem for the first time displays the message "Gems give you Health!", and then gives you a paltry 1 health. Since every built-in damage source in the game takes 10 health, it is common for many worlds to provide objects to disburse health instead.
Collecting a gem for the first time displays the message "Gems give you Health!", and then gives you a paltry 1 health. Since every built-in damage source in the game takes 10 health, it is common for many worlds to provide objects to disburse health instead.


Gems also increment the gem counter by 1 when collected. Unlike torches, ammo, or health, the player has no intrinsic means of expending gems. It is up the world designer to use [[ZZT-OOP]] to find a use for collected gems. Currency (for shops and other things) is one of the more common uses.
Gems also increment the gem counter by 1 when collected. Unlike torches, ammo, or health, the player has no intrinsic means of expending gems. It is up the individual world designer to use [[ZZT-OOP]] to find a use for collected gems. Currency (for shops and other things) is one of the more common uses.  


While gems are pushable, they cannot be directly pushed by the player since they are also collectable. If a player is to push a gem, then the gem must be behind a boulder or slider.
Others uses for gems include making a 'timer' by constantly subtracting from the player's gem count and specifying an command if there are no more, conditional endings/choices by attempting to take a certain amount, or as an anti-cheat measure by checking if the player has more gems than they could legitimately have collected in the game.
 
While gems are pushable, they cannot be directly pushed by the player since they are also collectible. If a player is to push a gem, then the gem must be behind a boulder or slider.


Gems give 10 points when collected, but zero points when shot or crushed.
Gems give 10 points when collected, but zero points when shot or crushed.

Latest revision as of 06:49, 17 December 2021

Gem
ZZT-OOP namegem
Internal ID7 (0x07)
Character#char 4 (0x04)
Categoryitem
Stats?no
Other traits
Effect on movementpushable, squishable
Destructible?yes
Uses ZZT-OOP color names?yes

The gem element is a collectible, multipurpose item.

Collecting a gem for the first time displays the message "Gems give you Health!", and then gives you a paltry 1 health. Since every built-in damage source in the game takes 10 health, it is common for many worlds to provide objects to disburse health instead.

Gems also increment the gem counter by 1 when collected. Unlike torches, ammo, or health, the player has no intrinsic means of expending gems. It is up the individual world designer to use ZZT-OOP to find a use for collected gems. Currency (for shops and other things) is one of the more common uses.

Others uses for gems include making a 'timer' by constantly subtracting from the player's gem count and specifying an command if there are no more, conditional endings/choices by attempting to take a certain amount, or as an anti-cheat measure by checking if the player has more gems than they could legitimately have collected in the game.

While gems are pushable, they cannot be directly pushed by the player since they are also collectible. If a player is to push a gem, then the gem must be behind a boulder or slider.

Gems give 10 points when collected, but zero points when shot or crushed.