Object: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(Created page with "{{Element |name=Object |zzt-oop name=object |category=creature |id={{Byte|36}} |color= |char= |stats=yes |x-y step=Yes |cycle=3 |p1=Character graphic |p2=Message lock |sco...")
 
mNo edit summary
 
Line 17: Line 17:
}}
}}


'''Objects''' are ZZT's general-purpose, customizable entity. While objects do nothing on their own, they can be programmed with [[ZZT-OOP]] to perform simple tasks such as moving, shooting and displaying text. It's possible to build more complex mechanisms using [[if|conditional statements]], [[label|label jumps]] and [[send|object-to-object communication]].
'''Objects''' are ZZT's general-purpose, customizable entity. While objects do nothing on their own, they can be programmed with [[ZZT-OOP]] to perform simple tasks such as moving, shooting and displaying text. It's possible to build more complex mechanisms using [[if|conditional statements]], [[label|label manipulation]] and [[send|object-to-object communication]].





Latest revision as of 22:16, 18 April 2021

Object
ZZT-OOP nameobject
Internal ID36 (0x24)
Character
Categorycreature
Stats
X/Y-stepYes
Default cycle3
P1Character graphic
P2Message lock
Other traits
Effect on movement
Destructible?no
Uses ZZT-OOP color names?yes

Objects are ZZT's general-purpose, customizable entity. While objects do nothing on their own, they can be programmed with ZZT-OOP to perform simple tasks such as moving, shooting and displaying text. It's possible to build more complex mechanisms using conditional statements, label manipulation and object-to-object communication.


Quirks

Dynamic Object Creation

Objects created with ZZT-OOP (like executing #put [dir] object in the direction of an empty space) have no ZZT-OOP program and default to a blank graphic (char 1). Objects can be cloned with their state and program intact via duplicators.


Changing an Object's Color

Objects cannot change their own color, and #become [color] object will delete the object's ZZT-OOP program and assign it char 1. All objects of a given color on the board can be changed at the same time using #change [old_color] object [new_color] object. One object may #put [dir] [color] object in the direction of an existing object and change its color that way.


Gameplay

  • The player cannot shoot an object while standing directly next to it: there must be at least one space between them and the object. The reverse is not true for objects.