Lock: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(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...")
 
No edit summary
 
Line 1: Line 1:
{{DISPLAYTITLE:lock}}
{{DISPLAYTITLE:lock}}
'''#lock''' and '''#unlock''' are [[ZZT-OOP]] commands that control whether an [[object]] receives [[messages]] from external sources.
'''#lock''' and '''#unlock''' are [[ZZT-OOP]] commands that control whether an [[object]] receives [[message|messages]] from external sources.


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

Latest revision as of 10:50, 24 December 2025

#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