Skip to content

Network ​

class in OpalScript

Host-owned multiplayer requests, ownership, and sender context.

Methods ​

MemberDescription
Network.SenderIdTrusted requesting player id, available only while a NetworkAction executes. Local play uses local.
Network.SenderIsHostWhether the requesting player is the room host (true in local play). Available only inside a NetworkAction.
Network.TryCooldownConsume a per-player named cooldown in seconds, shared across targets in this world. Returns false while cooling down.
Network.RejectEnd the current NetworkAction with a refusal reason. Check rules before changing state; actions are not rollback transactions.
Network.SetOwnerAssign an entity to a player on the host.
Network.OwnerIdRead an entity's current player owner id.
Network.LocalPlayerIdRead this client's player id.
Network.RequestRequest a named NetworkAction on this component with its typed arguments. The host runs it; outside a room it runs locally.
Network.SendInputSend the latest owner input for a named NetworkAction. The host applies bounds and expires stale input.

See also ​