Object name

From Wiki of ZZT
Revision as of 13:20, 17 April 2022 by Dark-Star2018 (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

An object name is assigned to an object by putting a @ and a word on the FIRST line of an object's code.

The most common use is to use multiple objects with the same name to #Bind them to all have the same code, for example, a multi-part object that has the same touch description.

If an object invokes the pop-up window, it's object name will also be visible to the player at the top of the window. This can be very useful to do things such as distinguish multiple NPC's, provide subtle hints to the player, make a cheap one-line joke, etc.

Memory Conservation

An object's name does not necessarily have to be make sense to a human reader. Whenever possible, it should be reduced to a single character (letter or number) in order to conserve memory, especially on a crowded board that is approaching the memory limit. It may be useful to keep an external reference of object names on boards with lots of objects for development purposes.