> For the complete documentation index, see [llms.txt](https://docs-kr.zep.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-kr.zep.us/creator/reference/script-object-interaction.md).

# ZEP 스크립트 상호작용 오브젝트 가이드

맵 에디터에서 오브젝트를 설치하여 상호작용시 ZEP 스크립트에서 감지해 상호 작용시 발생하는 이벤트를 스크립트로 작성할 수 있습니다.

\
맵 에디터에서 다음과 같이 ZEP Script 상호작용 오브젝트를 설치 할 수 있습니다.

&#x20;\[맵 에디터]  → \[오브젝트설치] → \[개발자 기능] → \[ZEP Script 상호작용 선택]

<div><figure><img src="/files/3uduTCojgRA04LIivOFU" alt=""><figcaption></figcaption></figure> <figure><img src="/files/BPwNdLgYM6SE2smPjjva" alt=""><figcaption></figcaption></figure></div>

오브젝트 설정에서 값을 입력한 뒤,&#x20;

<div align="left"><figure><img src="/files/qHhgvhmhqJsP2w5uzdqT" alt=""><figcaption></figcaption></figure></div>

다음과 같이 스크립트를 작성하여 앱 실행 후, 오브젝트와 상호작용시 입력한 값이 출력되는 것을 확인할 수 있습니다.

```javascript
App.onObjectTouched.Add(function (sender, x, y, tileID, obj) {
    if (obj !== null) {
        if (obj.type == ObjectEffectType.INTERACTION_WITH_ZEPSCRIPTS) {
            App.sayToAll(`Number = ${obj.text}, Value = ${obj.param1}`, 0xFFFFFF);
        }
    } else {
        App.sayToAll(`obj is null`, 0xFFFFFF);
    }
});
```

Script에서 `[obj.type == ObjectEffectType.INTERACTION_WITH_ZEPSCRIPTS]`를 조건으로 활용해 주세요.


---

# 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://docs-kr.zep.us/creator/reference/script-object-interaction.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.
