由 行动作、 位置和 标签构成的数据类型,由 用于创建生成路径上的点。
下面的代码块构建了一个 PathWaypoint 变量,其位置为 Vector3.new(10, 10, 10) ,其行动作为 Enum.PathWaypointAction.Walk ,其标签为 Custom Label:
local pos = Vector3.new(10, 10, 10)local waypoint = PathWaypoint.new(pos, Enum.PathWaypointAction.Walk, "Custom Label")
路径点也可以通过传递位置和动作来构建。标签属性将以空字符串的默认值设置。
local pos = Vector3.new(10, 10, 10)local waypoint = PathWaypoint.new(pos, Enum.PathWaypointAction.Walk)
行动
该 Action 描述了达到此路径节点的行动,可以设置为以下枚举值之一:
<th>值</th><th>描述</th></tr></thead><tbody><tr><td>步行</td><td>0</td><td>需要走行动来从前一个路径点到达这个路径点。</td></tr><tr><td>跳</td><td>1</td><td>需要跳跃行动才能从前一个路径点到达这个路径点。</td></tr></tbody>
名称 |
---|
概要
构造工具
- new(position : Vector3,action : Enum.PathWaypointAction,label : string)
从给定的 PathWaypoint 位置返回一个 Vector3 对象、Enum.PathWaypointAction 动作动和可选的字符串标签。
构造工具
new
从给定的 PathWaypoint 位置返回一个 Vector3 对象、Enum.PathWaypointAction 动作动和可选的字符串标签。
参数
路径的 3D 位置。
在路径点执行的行动。
生成路径点的导航区名称。
属性
Label
生成该里程碑的导航区域名称。您可以使用 PathwayPoint.Label 来决定采取的自定义行动以达到路径点。路径寻找修改器和材料每个都有一个标签。自动跳转链接的标签为“跳”。