Torch: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
mNo edit summary
m (Clarified that the torch message only displays the first time one is picked up in a game.)
 
Line 12: Line 12:
}}
}}


The '''torch''' element is ZZT's built-in method for giving the player torches. Touching a torch will add 1 to your torch counter and display the message "Torch - used for lighting in the underground."
The '''torch''' element is ZZT's built-in method for giving the player torches. Touching a torch will add 1 to your torch counter. The first time a player picks up a torch during a game, the following message is displayed: "Torch used for lighting in the underground."


Pressing the "T" key in a dark room will light a torch for 200 ticks. Pressing "T" in a non-dark room will display the message "Don't need torch - room is not dark!" In either case, if you don't have any torches then pressing "T" will display the message "You don't have any torches!"
Pressing the "T" key in a dark room will light a torch for 200 ticks. Pressing "T" in a non-dark room will display the message "Don't need torch room is not dark!" In either case, if you don't have any torches then pressing "T" will display the message "You don't have any torches!"


When a torch is active, the game will draw a circle around the player that is roughly 50 pixels in diameter. At its widest points, the lit portion of the room extends 4 tiles north and south of the player, and 7 tiles east and west of the player. (Interestingly, the shape of the torchlight is the exact same shape as a [[bomb]] explosion.)
When a torch is active, the game will draw a circle around the player that is roughly 50 pixels in diameter. At its widest points, the lit portion of the room extends 4 tiles north and south of the player, and 7 tiles east and west of the player. (Interestingly, the shape of the torchlight is the exact same shape as a [[bomb]] explosion.)


Each extra [[player|player clone]] on a board will exhaust an extra torch tick every cycle.
Player clones alter the duration torches remain lit; each extra [[player|player clone]] on a board will exhaust an extra torch tick every cycle.


Since torches are one of the few elements that are visible in the dark, they can be used to give dark rooms decorative contours and shape. This is colloquially referred to as "The Kangaroo Effect."
Since torches are one of the few elements that are visible in the dark, they can be used to give dark rooms decorative contours and shape. This is colloquially referred to as "The Kangaroo Effect."


Torches are also useful as a means of programmatically obtaining brown, e.g., by [[change|#changing]] another item to a torch and back.
Torches are useful as a means of programmatically obtaining brown, e.g., by [[change|#changing]] another item to a torch and back.


{{ElementsNavbox}}
{{ElementsNavbox}}

Latest revision as of 22:39, 13 February 2021

Torch
ZZT-OOP nametorch
Internal ID6 (0x06)
Character#char 157 ¥ (0x9D)
Default colordark brown on black (0x06)
Categoryitem
Stats?no
Other traits
Effect on movementsolid, collectible by the player
Destructible?no
Uses ZZT-OOP color names?no
Visible in the dark?yes

The torch element is ZZT's built-in method for giving the player torches. Touching a torch will add 1 to your torch counter. The first time a player picks up a torch during a game, the following message is displayed: "Torch – used for lighting in the underground."

Pressing the "T" key in a dark room will light a torch for 200 ticks. Pressing "T" in a non-dark room will display the message "Don't need torch – room is not dark!" In either case, if you don't have any torches then pressing "T" will display the message "You don't have any torches!"

When a torch is active, the game will draw a circle around the player that is roughly 50 pixels in diameter. At its widest points, the lit portion of the room extends 4 tiles north and south of the player, and 7 tiles east and west of the player. (Interestingly, the shape of the torchlight is the exact same shape as a bomb explosion.)

Player clones alter the duration torches remain lit; each extra player clone on a board will exhaust an extra torch tick every cycle.

Since torches are one of the few elements that are visible in the dark, they can be used to give dark rooms decorative contours and shape. This is colloquially referred to as "The Kangaroo Effect."

Torches are useful as a means of programmatically obtaining brown, e.g., by #changing another item to a torch and back.