Edge: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(The Edge)
 
mNo edit summary
Line 8: Line 8:
}}
}}


The element in [[ZZT]] that handles interactions between the player and the four edges of the board is colloquially known as the '''board edge''', or simply the '''edge'''. This element and the [[passage]] are the two methods available in the engine to switch boards.
The element in [[ZZT]] that handles interactions between the [[player]] and the four edges of the board is colloquially known as the '''board edge''', or simply the '''edge'''. This element and the [[passage]] are the two methods available in the engine to switch boards.


Any given ZZT board is surrounded on all sides off-screen by the board edge element. When this element is touched by the player moving toward the side of a board where an exit exists to another board, the engine will transport the player to that board. If they are going north or south, the player will be placed in the row closest to the south or north sides of the board respectively, and retain their X coordinate. If going east or west, the player will enter the next board at the column closest to the west or east respectively, and keep their Y coordinate. If the player's path is blocked on the other board or if there is no board exit in that direction at all, the element has no effect. As with the [[passage]], entering a "re-enter when zapped" board from a board edge will reset the position the player will be returned to when hurt to the position where they entered the board.
Any given ZZT board is surrounded on all sides off-screen by the board edge element. When this element is touched by the player moving toward the side of a board where an exit exists to another board, the engine will transport the player to that board. If they are going north or south, the player will be placed in the row closest to the south or north sides of the board respectively, and retain their X coordinate. If going east or west, the player will enter the next board at the column closest to the west or east respectively, and keep their Y coordinate. If the player's path is blocked on the other board or if there is no board exit in that direction at all, the element has no effect. As with the [[passage]], entering a "re-enter when zapped" board from a board edge will reset the position the player will be returned to when hurt to the position where they entered the board.

Revision as of 03:26, 14 February 2021

Edge
ZZT-OOP name(blank)
Internal ID1 (0x01)
Character#char 32 (0x20)
Stats?no
Other traits
Effect on movementwall; blocks movement of most entities but causes the player to teleport on touch
Uses ZZT-OOP color names?yes

The element in ZZT that handles interactions between the player and the four edges of the board is colloquially known as the board edge, or simply the edge. This element and the passage are the two methods available in the engine to switch boards.

Any given ZZT board is surrounded on all sides off-screen by the board edge element. When this element is touched by the player moving toward the side of a board where an exit exists to another board, the engine will transport the player to that board. If they are going north or south, the player will be placed in the row closest to the south or north sides of the board respectively, and retain their X coordinate. If going east or west, the player will enter the next board at the column closest to the west or east respectively, and keep their Y coordinate. If the player's path is blocked on the other board or if there is no board exit in that direction at all, the element has no effect. As with the passage, entering a "re-enter when zapped" board from a board edge will reset the position the player will be returned to when hurt to the position where they entered the board.

The board edge element cannot be placed using the internal editor. However, if a ZZT-OOP program runs #put, #change, or #become to create an element without specifying its type, whether or not the command requests a color, the result will be a board edge tile. The element was initially documented as the "green" in the 1995 ZZT Manual because it was discovered by specifying "green" without an element. The default ZZT-OOP color names will all place a board edge of the appropriate color, but this will not be visible as it only affects the foreground color of the board edge, which uses a blank character by default. An external editor, however, can be used to place a board edge tile in any of the available background colors, and a board edge created by using #change or #put on another element will retain the former element's background color. If an object uses #become to turn into a board edge, it will take the background color of the tile beneath it, not the object itself.

If a board edge is duplicated onto a player from any direction, it will act as if the player were moving toward the east.