Ammo: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(Flesh out ammo article a bit)
m (1. changed "a pain" to "time-consuming." 2. Added a line about the message displayed when first picking up ammo.)
 
Line 12: Line 12:
The '''ammo''' element is ZZT's built-in method for giving the player ammunition.
The '''ammo''' element is ZZT's built-in method for giving the player ammunition.


Picking up an instance of ammo increments the player's [[Ammo (counter)|ammo counter]] by 5 shots. The amount is not configurable, making it a pain for the player to pick up a large quantity of it. For this reason, many modern ZZT worlds do not use ammo for its intended purpose, and instead substitute an [[object]] that [[Give|#gives]] ammo, or initialize the [[world]] with a non-zero ammo counter.
Picking up an instance of ammo increments the player's [[Ammo (counter)|ammo counter]] by 5 shots. The amount is not configurable, making it time-consuming for the player to pick up a large quantity of it. For this reason, many modern ZZT worlds do not use ammo for its intended purpose, and instead substitute an [[object]] that [[Give|#gives]] ammo, or initialize the [[world]] with a non-zero ammo counter.
 
The first time a player picks up ammo during a game, the following message is displayed: "Ammunition — 5 shots per container."


Ammo is useful as a means of programmatically obtaining dark cyan, e.g., by [[Change|#changing]] another item to ammo and back.
Ammo is useful as a means of programmatically obtaining dark cyan, e.g., by [[Change|#changing]] another item to ammo and back.


{{ElementsNavbox}}
{{ElementsNavbox}}

Latest revision as of 22:34, 13 February 2021

Ammo
ZZT-OOP nameammo
Internal ID5 (0x05)
Character#char 132 ä (0x84)
Default colordark cyan on black (0x03)
Categoryitem
Stats?no
Other traits
Effect on movementpushable
Destructible?no
Uses ZZT-OOP color names?no

The ammo element is ZZT's built-in method for giving the player ammunition.

Picking up an instance of ammo increments the player's ammo counter by 5 shots. The amount is not configurable, making it time-consuming for the player to pick up a large quantity of it. For this reason, many modern ZZT worlds do not use ammo for its intended purpose, and instead substitute an object that #gives ammo, or initialize the world with a non-zero ammo counter.

The first time a player picks up ammo during a game, the following message is displayed: "Ammunition — 5 shots per container."

Ammo is useful as a means of programmatically obtaining dark cyan, e.g., by #changing another item to ammo and back.