# Avatar Teleport & Checkpoint

***

## EntityCheckPoint

**Create An Action That Sets A New Spawn Point**

This guide provides instructions for setting up the **EntityCheckPoint** action. In the sample app, once the avatar enters one of the green trigger areas, the area becomes the new spawn location.

| <img src="/files/lOqpjzrl4KRSYzwEZnG8" alt="" data-size="original">                           | <img src="/files/wlzdct0dEL6s5B3ngHOX" alt="" data-size="original"> | <img src="/files/0tYI5DQ9n3AR1S5I2h7g" alt="" data-size="original"> |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| The avatar enters the green trigger area and the trigger area becomes the new spawn location. | The avatar has fallen off the map and needs to be respawned.        | When the avatar respawns, it is spawned at the new location.        |

In this example, a trigger area is created and when triggered, an action sets a new spawn location. Any object can be used as a trigger, as long as the object has a collision component.&#x20;

{% stepper %}
{% step %}

### Create a trigger area

A. Create a new **Sphere** entity.

B. The **Collision** component is not required for **EntityCheckPoint** action to work. The **Collision** component is required for the **EntitySubscribeTriggerEnter** trigger that will be used in this example.

C. Adding a material is optional. A transparent material has been added so that the trigger area is visible in play mode.

D. Click the **Edit Viverse Extension** button.

<figure><img src="/files/EBXUqK6byY2VnTzMvWWS" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Add the EntityCheckPoint action

A. In the VIVERSE extension, select the **TriggerAndAction** plugin for the **Select plugins** dropdown.

B. Add a **Trigger** and select **EntitySubscribeTriggerEnter**.

C. Add **local-player** to the **tags to filter** field.

D. Add an **Action** and select **EntityCheckPoint.**

E. Add an entity that has a position that will be used for the new spawn location. **SpawnLocation1** has been added to the **pick up an entity id**.

<figure><img src="/files/b64viewY5sO09cr9cPN5" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## TeleportAvatar

**Create An Action That Teleports An Object To A Specific Location**

This guide provides instructions for setting up the **TeleportAvatar** action. In the sample app, once the avatar enters one of the green cylinder trigger areas, the avatar is teleported to another location.

| <img src="/files/k3cUUtzNG33c7Ox4GaYI" alt="" data-size="original"> | <img src="/files/JhLwiDErnsTmnEVthJKo" alt="" data-size="original">                  |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| The avatar enters the green trigger area.                           | After entering the green trigger area, the avatar is teleported to another location. |

In this example, a trigger is created and when the avatar or other objects enter the trigger area, an action teleports the avatar to a specific location. Any object can be used as a trigger, as long as the object has a collision component.&#x20;

{% stepper %}
{% step %}

### Create a trigger area

A. Create a new **Sphere** entity.

B. The **Collision** component is not required for **TeleportAvatar** action to work. The **Collision** component is required for the **EntitySubscribeTriggerEnter** trigger that will be used in this example.

C. Adding a material is optional. A transparent material has been added so that the trigger area is visible in play mode.

D. Click the **Edit Viverse Extension** button.

<figure><img src="/files/yekPA3QJ3vZiDIaCR79x" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Add the TeleportAvatar action

A. In the VIVERSE extension, select the **TriggerAndAction** plugin for the **Select plugins** dropdown.

B. Add a **Trigger** and select **EntitySubscribeTriggerEnter**.

C. Add **local-player** to the **tags to filter** field.

D. Add an **Action** and select **EntityTeleportAvatar.**

E. Add an entity that has a position that will be used for the teleport location. **TeleportLocation2** has been added to the **Specify the Entity whose location you want to teleport to**.

<figure><img src="/files/vbq8wV0d5oL6tJSr0ipW" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# 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://docs.viverse.com/playcanvas-toolkit/building-with-the-playcanvas-toolkit/no-code-tools/trigger-and-action/avatar-teleport-and-checkpoint.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.
