> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/character-movement/escort-a-character.md).

# 护送角色

连接 Convai Escort 节点，使一个角色带领另一个角色前往关卡中的目的地，并在对方落后时等待。

请使用 `Convai 陪护` 该节点将一个角色（引导者）送往某个目的地，同时带领另一个角色（被护送者）前往，并在被护送者落后时等待。本页会将该节点从头到尾接线，并确认两个角色都能到达。

### 先决条件

* 护送 Actor 的 Pawn 由一个 **AI 控制器**，并满足与 `Convai 移动到`相同的移动前提条件：一个移动组件、一个路径跟随组件，以及覆盖路线的 NavMesh。
* 护送 Actor 拥有一个 `Convai 聊天机器人` 组件——当被护送角色落后时，它用于临时跟随提示。
* 被护送角色是一个有效、已注册的 Actor，你可以将其引用为一个 `FConvaiObjectEntry`.

{% hint style="info" %}
护送与 `Convai 移动到`。请参见 [角色移动的工作原理](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/character-movement/how-character-movement-works.md) 如果你还没有阅读。
{% endhint %}

### 添加 Convai Escort 节点

{% stepper %}
{% step %}

#### 添加该节点

在引导角色的 Blueprint 图表中，右键单击并搜索 `Convai 陪护`。添加该节点——它属于以下类别 `Convai|Movement`.
{% endstep %}

{% step %}

#### 设置护送 Actor

将引导角色连接到 **正在护送的 Actor**。该 Actor 必须拥有 `Convai 聊天机器人` 用于跟随提示的组件。
{% endstep %}

{% step %}

#### 设置被护送角色

**被护送角色** 接受一个 `FConvaiObjectEntry`，并具有相同的 **对象是** (`ObjectReference`), **组件名称**，以及 **Socket 或骨骼名称** 字段，类似于移动目标。将 **Ref** 设置为被引导的角色。
{% endstep %}

{% step %}

#### 构建目标位置

**目标** 接受一个 `FConvaiObjectEntry`，与 `Convai 移动到` ——整个 Actor、某个特定组件，或该条目作者定义的移动点。参见 [编写移动点](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/character-movement/author-movement-points.md).
{% endstep %}

{% step %}

#### 处理成功和失败

连接两个执行输出：

* **成功** 在以下情况触发： **结果代码** 为 `已到达` 或 `已在目标处`.
* **失败** 会对其他所有结果代码触发。

两个引脚都暴露 **结果代码** 和 **附加说明**.
{% endstep %}
{% endstepper %}

### 验证护送

进入播放模式并触发 `Convai 陪护` 调用。护送 Actor 应该朝目标位置行走，并在被护送角色落后时暂停，待其跟上后继续前进。当两个 Actor 都到达目标位置时， **成功** 会触发，并带有 **结果代码** `已到达`。如果在护送开始时两者都已经在目标位置， **成功** 会立即触发，并带有 `已在目标处`.

{% hint style="success" %}
打开 [Convai 调试覆盖层](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/troubleshooting/convai-debug-overlay.md) 并选择护送 Actor，以在护送运行时查看其动作队列和结果条。
{% endhint %}

### 下一步

{% content-ref url="/pages/fe2709cf5bf6a7672496c921feec0b67560cce83" %}
[将角色移动到对象](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/character-movement/move-a-character-to-an-object.md)
{% endcontent-ref %}

{% content-ref url="/pages/2db1977bcc865a9fcbab486f2c4905551657d9f3" %}
[移动 Blueprint 参考](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/character-movement/movement-blueprint-reference.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://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/character-movement/escort-a-character.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.
