Water: Difference between revisions
(Your way is blocked by water.) |
(explain why you can programmatically place water in any ZZT-OOP color (i.e. its default color is > COLOR_SPECIAL_MIN)) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Element | {{Element | ||
|zzt-oop name=water | |zzt-oop name=water | ||
|id=19 | |id={{Byte|19}} | ||
|char={{CharSwatch|176}} | |char={{CharSwatch|176}} | ||
|color={{ColorSwatch|fg=blue|bg=gray|blinking}} | |||
|stats=no | |stats=no | ||
|category=terrain | |category=terrain | ||
Line 12: | Line 13: | ||
The '''water''' element is one of the built-in materials in [[ZZT]]. It impedes all movement, but unlike other wall tiles, it can be crossed by [[bullet]]s or [[star]]s. In addition, the [[shark]] can only move within water. Whenever the [[player]] touches water, the engine plays a special [[sound effects|sound effect]] and announces "Your way is blocked by water." Neither of these can be removed without editing the engine, or using a fork that does so like [[CleanZZT]]. | The '''water''' element is one of the built-in materials in [[ZZT]]. It impedes all movement, but unlike other wall tiles, it can be crossed by [[bullet]]s or [[star]]s. In addition, the [[shark]] can only move within water. Whenever the [[player]] touches water, the engine plays a special [[sound effects|sound effect]] and announces "Your way is blocked by water." Neither of these can be removed without editing the engine, or using a fork that does so like [[CleanZZT]]. | ||
By default, when placed by the built-in editor, water is {{ColorSwatch|fg=blue|bg=gray|blinking}}, which, unless blinking is turned off, results in default-color sharks appearing as solid blocks. However, in [[DEMO.ZZT]], water is shown as {{ColorSwatch|fg=white|bg=dark blue|blinking}}, where the sharks are clearly visible, suggesting this was the default color at the time. Water does not assume either color when placed programmatically, | By default, when placed by the built-in editor, water is {{ColorSwatch|fg=blue|bg=gray|blinking}}, which, unless blinking is turned off, results in default-color sharks appearing as solid blocks. However, in [[DEMO.ZZT]], water is shown as {{ColorSwatch|fg=white|bg=dark blue|blinking}}, where the sharks are clearly visible, suggesting this was the default color at the time. Water does not assume either color when placed programmatically because its default color value of 0xF9 is greater than 0xF0, which is defined as the minimum special color setting for an element that can have its color changed. This means an [[object]] can place water in any of the default [[ZZT-OOP]] colors, or overwrite an item or colored [[empty]] to use its color. It can be drawn in any of the available colors with an external editor. | ||
The [[forest]] uses the same character as water, {{CharSwatch|176}}, but is traversible. | The [[forest]] uses the same character as water, {{CharSwatch|176}}, but is traversible. |
Latest revision as of 00:33, 6 December 2021
Water | |
---|---|
ZZT-OOP name | water |
Internal ID | 19 (0x13) |
Character | #char 176 ░ (0xB0) |
Default color | blinking blue on light gray (0xF9) |
Category | terrain |
Stats? | no |
Other traits | |
Effect on movement | wall |
Destructible? | no |
Uses ZZT-OOP color names? | yes |
The water element is one of the built-in materials in ZZT. It impedes all movement, but unlike other wall tiles, it can be crossed by bullets or stars. In addition, the shark can only move within water. Whenever the player touches water, the engine plays a special sound effect and announces "Your way is blocked by water." Neither of these can be removed without editing the engine, or using a fork that does so like CleanZZT.
By default, when placed by the built-in editor, water is blinking blue on light gray (0xF9), which, unless blinking is turned off, results in default-color sharks appearing as solid blocks. However, in DEMO.ZZT, water is shown as blinking white on dark blue (0x9F), where the sharks are clearly visible, suggesting this was the default color at the time. Water does not assume either color when placed programmatically because its default color value of 0xF9 is greater than 0xF0, which is defined as the minimum special color setting for an element that can have its color changed. This means an object can place water in any of the default ZZT-OOP colors, or overwrite an item or colored empty to use its color. It can be drawn in any of the available colors with an external editor.
The forest uses the same character as water, #char 176 ░ (0xB0), but is traversible.
Elements | |
---|---|
Special | |
Items | |
Terrain | |
Creatures | |
Text |