# Adding Trigger Event

### Creating A Trigger Event

{% hint style="info" %}

1. Create a box or other 3D Object to act as your trigger - make sure this object has a collider set to **IsTrigger**
2. Add the **PadlockTrigger** script to that 3D object and add the padlock controller object to the inspector slot named **PadlockController**
   1. By default the interaction key is set to **E**
      {% endhint %}

<figure><img src="/files/4lubtzmeJJmzaooQTz9G" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
3\. In the **PadlockController** script make sure to:&#x20;

1. Tick **IsPadlockTrigger**
2. Add the Padlock Trigger GameObject to the TriggerObject slot
   {% endhint %}

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

{% hint style="warning" %}
Remember to take a look at the demo scene if you have any troubles, it might give you an idea on how to fix an issue.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://speedtutoruk.gitbook.io/padlock-system-doc/support/adding-trigger-event.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
