lock

From Wiki of ZZT
Revision as of 16:28, 11 February 2021 by Rbts (talk | contribs) (Created page with "{{DISPLAYTITLE:lock}} '''#lock''' and '''#unlock''' are ZZT-OOP commands that control whether an object receives messages from external sources. While locked, an...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

#lock and #unlock are ZZT-OOP commands that control whether an object receives messages from external sources.

While locked, an object will not receive incoming messages from other objects, or built-in messages such as #touch. A locked object can still #send messages to itself, as well as send outgoing messages to other objects. This allows objects to complete sequences of commands without interruption.

If a locked object reaches an #end command (or the end of its program) without unlocking, it will become unresponsive, as there is no way to unlock an object remotely.

Quirks