How do I assign Different object to peers in Multiplayer?

0 favourites
  • 4 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hi,

    I'm developing 4 players multiplayer game. When 4 players are connected I need to assign them different objects. For example,

    Host player = man

    1 st peer = cat

    2nd peer = dog

    3rd peer = another object

    like that.

    So how do I do that using this plugin? Any Help?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The host, upon receiving an input (or message) indicating the preferred choice from the peer, can spawn and associate the correct synced object for the peer.

  • The host, upon receiving an input (or message) indicating the preferred choice from the peer, can spawn and associate the correct synced object for the peer.

    Sorry, I don't get it. Can you give me an example or Explain a little bit to me?

  • The way the multiplayer plugin works is explained through 4 tutorials that can be found in the manual article.

    You could have a single sprite object, but displaying a different animation (if the controls are pretty much the same), and using "Send message" action in order to let the host know what animation/object type is to be assigned to what peer (using the PeerID expression in order to identify the peer).

    This likely will mean keeping some array from your host's side, in order to know what PeerID is associated with what animation

    The same think applies if you want to spawn/associate a specific object type instead of instances (the tutorials display how to use instances but the logic is the same for you if you want to rely on different object types).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)