Torch: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(Why's it called the Kangaroo Effect anyway?)
 
mNo edit summary
Line 16: Line 16:
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 the 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.
Each extra [[player|player clone]] on a board will exhaust an extra torch tick every cycle.

Revision as of 13:08, 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 and display the message "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.)

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 also useful as a means of programmatically obtaining brown, e.g., by #changing another item to a torch and back.