Network
class in OpalScript
Host-owned multiplayer requests, ownership, and sender context.
Methods
| Member | Description |
|---|---|
| Network.SenderId | Trusted requesting player id, available only while a NetworkAction executes. Local play uses local. |
| Network.SenderIsHost | Whether the requesting player is the room host (true in local play). Available only inside a NetworkAction. |
| Network.TryCooldown | Consume a per-player named cooldown in seconds, shared across targets in this world. Returns false while cooling down. |
| Network.Reject | End the current NetworkAction with a refusal reason. Check rules before changing state; actions are not rollback transactions. |
| Network.SetOwner | Assign an entity to a player on the host. |
| Network.OwnerId | Read an entity's current player owner id. |
| Network.LocalPlayerId | Read this client's player id. |
| Network.Request | Request a named NetworkAction on this component with its typed arguments. The host runs it; outside a room it runs locally. |
| Network.SendInput | Send the latest owner input for a named NetworkAction. The host applies bounds and expires stale input. |