Each multiplayer session is hosted by a player in the session, starting from the player who first joins and starts that session
For games with an object for each player, like a Player Character, the best approach is to utilize the Multiplayer Spawner node.
Here’s a simple example of making the Platformer Player premade into a multiplayer-suited playable character.
Multiplayer Info executes the Multiplayer Spawner when On Player Joined
happens. Multiplayer Spawner has the premade set as its Object to Spawn
.
Because this is a regular object and not a reusable, it needs to be set as a Reference Object
for the object to not spawn on its own to the world. This premade consists of two objects, the Player model and the camera cube (inside), which both need to be enabled from their Object nodes inside the Details panel.
There are a couple of nodes that are specifically meant to be used for multiplayer features.
Multiplayer Control |
Multiplayer Info |
Multiplayer Spawner |
Multiplayer Sync |
Player Broadcaster |
Player Broadcast Listener |
Player Beacon |
Global State |
Some Multiplayer Nodes include properties that use a Player Index. These indexes correspond to each Player in the multiplayer session and are assigned based on the order each player joins.
Host | The player who’s been assigned as the host that all clients will follow. |
Owner | Only in the Multiplayer Sync node - the player who's executing the node. |
Zero / One / Two / Three | Each player based on the order they joined. |
The following nodes are not supported in multiplayer games:
For the time being, playtesting a full, custom multiplayer game requires you to activate editor live streaming.
Here's how:
When playtesting, you can add players, switch to test a different player, and remove players from the playtest session.
Multiplayer Settings Multiplayer Games See Others: Ghost Multiplayer