Line: Difference between revisions

From MZXWiki
Jump to navigation Jump to search
(Removed redirect to Terrain#Line)
Tag: Removed redirect
No edit summary
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
[[Category:MegaZeux]] [[Category:MegaZeux built-in objects]] [[Category:Terrains]]
[[Category:MegaZeux]] [[Category:MegaZeux built-in objects]] [[Category:Terrains]]


A [[Line]] (ID 4, <code>Line</code>) is a [[built-in]] [[terrain]]. Lines are a generic wall type that use the configured [[thick lines]] ID chars (144-159) to determine their display character based on their surroundings.
[[Line]] (ID 4, <code>Line</code>) is a [[built-in]] [[terrain]]. Lines are a generic wall type that use the configured [[thick lines]] ID chars (144-159) to determine their display character based on their surroundings.


=== ZZT connection===
== Behavior ==
The display character of a Line is derived from the IDs in the four positions immediately surrounding it:
 
offset = 0
if Line or board edge to the north:
  offset += 1
if Line or board edge to the south:
  offset += 2
if Line or board edge to the east:
  offset += 4
if Line or board edge to the west:
  offset += 8
char = offset + thick lines ID animation start (144)
 
== ZZT connection ==
In [[ZZT]], the equivalent element to Line is [[zzt:Line]].
In [[ZZT]], the equivalent element to Line is [[zzt:Line]].

Latest revision as of 06:36, 13 June 2025

Line # 4 Id4.png
Robotic name Line
Default color none
Default param none
ID char 0 (#4)
ID anim. chars Thick lines (#144-#159)

Line (ID 4, Line) is a built-in terrain. Lines are a generic wall type that use the configured thick lines ID chars (144-159) to determine their display character based on their surroundings.

Behavior

The display character of a Line is derived from the IDs in the four positions immediately surrounding it:

offset = 0

if Line or board edge to the north:
  offset += 1

if Line or board edge to the south:
  offset += 2

if Line or board edge to the east:
  offset += 4

if Line or board edge to the west:
  offset += 8

char = offset + thick lines ID animation start (144)

ZZT connection

In ZZT, the equivalent element to Line is zzt:Line.