Object: Difference between revisions
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
|color= | |color= | ||
|char={{CharSwatch|1}} | |char={{CharSwatch|1}} | ||
|stats= | |stats=yes | ||
|x-y | |x-y stey=Yes | ||
|cycle=3 | |cycle=3 | ||
|p1=Character graphic | |p1=Character graphic | ||
| Line 19: | Line 19: | ||
'''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]]. | '''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]]. | ||
Every tick, objects execute ZZT-OOP code if applicable, and then move in whatever direction they happen to be [[walk|walking]] in. | |||
== Quirks == | == Quirks == | ||
| Line 25: | Line 26: | ||
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 [[duplicator|duplicators]]. | 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 [[duplicator|duplicators]]. | ||
=== Changing an Object's Color === | === Changing an Object's Color === | ||
| Line 31: | Line 31: | ||
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. | 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. | ||
=== Default Character === | |||
Objects placed in the editor default to {{CharSwatch|1}}. Objects created by a [[put|#put]] statement default to {{CharSwatch|0}}. Statless objects display as {{CharSwatch|2}}. | |||
=== Gameplay === | === Gameplay === | ||
Latest revision as of 09:57, 26 December 2025
| Object | |
|---|---|
| ZZT-OOP name | object |
| Internal ID | 36 (0x24) |
| Character | #char 1 ☺ (0x01) |
| Category | creature |
| Stats | |
| Default cycle | 3 |
| P1 | Character graphic |
| P2 | Message lock |
| Other traits | |
| Effect on movement | Wall |
| 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.
Every tick, objects execute ZZT-OOP code if applicable, and then move in whatever direction they happen to be walking in.
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.
Default Character
Objects placed in the editor default to #char 1 ☺ (0x01). Objects created by a #put statement default to #char 0 (0x00). Statless objects display as #char 2 ☻ (0x02).
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.
| Elements | |
|---|---|
| Special | |
| Items | |
| Terrain | |
| Creatures | |
| Text | |