> For the complete documentation index, see [llms.txt](https://docs.sandbox.game/the-game-maker-academy_kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sandbox.game/the-game-maker-academy_kr/tutorials-1/beginner-tutorials/moving-platforms.md).

# 움직이는 플랫폼

먼저 플랫폼 설정을 진행하겠습니다.

* 애셋에 '**Basic Platform**' 비헤이비어를 지정합니다.
* 동일한 애셋에 '**Toggle Behaviour**' 컴포넌트를 부여합니다.

Toggle Behaviour은 켜는 메시지를 전송하기 전까지 애셋의 비헤이비어를 꺼둘 수 있습니다.

* '**Toggle Behaviour**' 컴포넌트 설정 밑 '**Turn ON Message**'에 메시지를 부여합니다. 이 예시에서는 메시지로 '**platformOn**'을 사용했습니다.
* '**initial Behaviour State**'를 '**False**'로 설정합니다.

이제 플랫폼이 동작하지 않은 채 게임이 시작하고 움직이기 전까지 '**platformOn**' 메시지를 기다립니다.

![](/files/-MPxpxaX8_6X_inJzQdK)

이제 플랫폼이 세팅되었으니 메시지를 보내는 방법이 필요하며, 여기에는 몇 가지 방법이 있습니다. 첫 번째 예시는 버튼을 눌렀을 때 플랫폼을 동작하게 하는 방법입니다.

* 애셋을 배치하고 '**Button**' 비헤이비어를 부여합니다.
* 버튼 행동의 설정에서 '**Message to Send**' 박스에 조금 전 Toggle Behaviour 컴포넌트를 설정할 때 플랫폼에 부여한 메시지와 동일한 메시지를 입력합니다. 이 예시에서는 '**platformOn**'을 사용했습니다.

![](/files/-MPxq08z4rrtC1S5GGuz)

이제 플레이어가 버튼을 누르면 플랫폼이 작동합니다.

다음으로, 플레이어가 특정 지역에 도달했을 때 플랫폼을 움직이게 하는 방법을 알아보겠습니다.

* 아무 애셋이나 배치 후에 해당 애셋을 '**투명**'하게 만들고 '**No** **Collisions**'로 설정하여 아바타를 감지하면 플랫폼이 트리거되도록 만들어 보겠습니다.
* 애셋에 부여된 행동을 삭제하고 '**Speaker'** 컴포넌트를 부여합니다.
* '**Speaker'** 컴포넌트 설정에서 '**Text to display**' 필드에 텍스트가 입력되어 있다면 해당 텍스트를 삭제합니다.
* '**Display condition**'을 '**DetectEntity**'로 설정합니다.
* '**Message When Spoken**' 필드를 '**platformOn**' 메시지로 설정합니다.

감지 범위가 너무 좁지 않도록 합니다. 보통 3 정도로 설정하면 적당합니다.

![](/files/-MPxsw2alPlSjDx8z4hp)

모두 완료되었습니다! 이제 아바타가 투명한 오브젝트 근처로 가면 플랫폼을 움직이라는 메시지가 전송됩니다. 다른 애셋을 죽이거나 오브젝트를 수집하는 상황에서도 이를 똑같이 적용할 수 있습니다.


---

# 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.sandbox.game/the-game-maker-academy_kr/tutorials-1/beginner-tutorials/moving-platforms.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.
