ReferenceMulti-instance

apex.ipc.self

Returns the Peer that other instances see for this one.

Syntax

apex.ipc.self() -> Peer?

Returns

TypeDescription
Peer?This instance, or nil while Apex IPC is unavailable.

Description

The id is the one other instances use to address this instance. A script can send to itself; the message is delivered like any other.

Example

local me = apex.ipc.self()
print("this instance is", me.name, me.id)

These are Game executor contracts. Check build requirements and session lifetimes before using them.