Multiplayer synced variables are not updated peer-side

0 favourites
  • 3 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hey, all I'm struggling to get this to work.

    Context:

    I have a node object that is spawned after being synced and has its variable synced. When the peer joins it seems the synced variable that decides what to display hasn't got a variable on the peer side.

    As far as I'm aware they should be.

    A construct file is available to showcase this.

    To replicate what I'm talking about:

    Download file

    Preview the project and in two tabs bring up the game. Create a lobby as the host.

    The node will have chosen random animations.

    Join as the peer into the lobby the nodes if you did this via debug mode you can see the instance variables won't have been synced over from the host.

    I've probably missed something but after searching and searching I've given up.

    For the sake of time, this is built on top of the Multiplayer Real Time Example

    https://drive.google.com/file/d/1z5tX74QYR1WetVvhJb_kmhYVZTXUKhT-/view?usp=share_link

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • construct.net/en/make-games/manuals/construct-3/plugin-reference/multiplayer

    Sync instance variable

    Add an instance variable to sync with an object. The host sends the values of the instance variable for each object to the peers, keeping them up to date. The chosen object must already first be synced with Sync object.

    The Precision corresponds to the precision for Sync object, with an additional Very low (uint8, 1 byte) option, useful for bitwise flags.

    Interpolation can be None (updates in steps), linear (linearly smoothed interpolation between values, suitable for positions), or angular (rotational interpolation between angles).

    The Client value tag should be the name of the corresponding client input value, if any, to help ensure the host can sync the instance variable with minimal latency.

    Note: text instance variables cannot be synced, only numbers. To share text data between peers, use messages instead.

  • Ah completely forgot that string couldn't be sent. Thanks!

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