Actors

get_comm_channel

返回通道 ID 的通信事件。

语法

get_comm_channel(channelId: integer): Instance | nil

参数

名称类型描述
channelIdintegercreate_comm_channel 返回的通信通道标识符。

返回值

名称类型描述
eventInstance | nil通信通道使用的可绑定事件。

说明

返回通道 ID 的通信事件。

使用 1 个参数调用: channelId。参数表会说明哪些值必填,哪些值只用于细化行为。

返回 event (Instance | nil)。使用返回表区分成功值、nil 结果和可恢复错误。

示例

使用占位值的示例调用。

local result = get_comm_channel(1)
print(result)