> For the complete documentation index, see [llms.txt](https://speedtutoruk.gitbook.io/keypad-system-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://speedtutoruk.gitbook.io/keypad-system-doc/support/unlock-event.md).

# Unlock Event

### What happens **when the code is valid?**

{% hint style="info" %}

1. Click the **+** icon in the bottom right, it will add a new event and you can place any gameobject which may have a script with a public method you want to call.&#x20;
2. In this case I have added the door object, this has a script called **DoorController** which has a public method called **OpenDoor**
3. You can then run this code each time you unlock something, this can be changed on each door, and multiple events can happen in each
   {% endhint %}

### Event Example

{% hint style="info" %}

* In the example below you can see the event opens from the script **DoorController**&#x20;
* The **DoorController** exists on the door object itself.
  {% endhint %}

<figure><img src="/files/PqNLhd5iWLC1c1XEgueo" alt=""><figcaption></figcaption></figure>

### Stopping Keypad Interactions

{% hint style="info" %}
I have also added a **RemoveTag** script in case you want to remove the tag to stop interaction with the keypad once you get a specific code. (This stops you from interacting with keypads after, if you wish)

* See the **Scripts > Event Examples** folder
  {% endhint %}

{% content-ref url="/pages/TkVC63vG1aIA7FlHWZp2" %}
[Stopping Interaction](/keypad-system-doc/support/stopping-interaction.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://speedtutoruk.gitbook.io/keypad-system-doc/support/unlock-event.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
