Lock: Difference between revisions

From MZXWiki
Jump to navigation Jump to search
(Created page with "{{ID |name = Lock |id = 40 |robotic = Lock |color = none |param = 0 |idchar = 10 |effect_touch = '''If matching held key''': take held key, become Space, move Player;<br>'''Otherwse''': block Player }} Category:MegaZeux Category:MegaZeux built-in objects Category:Items Lock (ID 40, <code>Lock</code>) is a built-in item. When touched by the Player, if the Player has a held key matching the Lock, the Lock will take this h...")
 
(No difference)

Latest revision as of 02:25, 14 June 2025

Lock # 40 Id40.png
Robotic name Lock
Default color none
Default param 0
ID char 10 (#40)
Effect when
touched
If matching held key: take held key, become Space, move Player;
Otherwse: block Player

Lock (ID 40, Lock) is a built-in item.

When touched by the Player, if the Player has a held key matching the Lock, the Lock will take this held key from the player, display the message You open the lock., play SFX 10 (Unlock), become a Space, and move the Player onto the new Space. If the Player does not have a held key matching the Lock, it will display the message You need an appropriate key!, play SFX 11 (Need Key), and act as a wall.

The color of held key the Lock needs to open is derived from the foreground color of the Lock, i.e. if the Lock has color ce2, the Player needs a held key of color 2 to open the Lock.

Version differences

Main page: Key (thing)#Version differences

In MegaZeux 1.x, Locks display different messages based on their color.

ZZT connection

In ZZT, the equivalent element to Lock is zzt:Door.