======Key======
=====Description=====
A key is a special kind of [[patterns:item]] that is used to unlock [[patterns:lock]]s, lower [[patterns:barrier]]s, or gain access to secret areas.
=====Variables and Affordances=====
* Associated lock: what the key unlocks
* Location: where the key is originally held, and how far away it is from its associated lock. Searching for keys in a level is a common way to have a player fully explore an area and have many different enemy encounters.
=====Examples=====
* [[games:zelda-oot|Legend of Zelda: Ocarina of Time]]. In the dungeons in this game, keys to [[patterns:boss_battle|boss battle]] areas are often found in [[patterns|container|chests]] elsewhere in the dungeon.
=====Related Patterns=====
* [[patterns:lock|Lock]]: keys can be used to used to unlock locks
* [[patterns:container|Container]]: keys might be found inside containers elsewhere in a level
* [[patterns:Item]]: a key is a kind of item
{{tag>level:element games:zelda-oot}}