[Solved] How do I sync Touch.X and Touch.Y of Peer with the Host ?

0 favourites
  • 3 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hi, I am getting confused on syncing Touch.X and Touch.Y only of the Peer values to Host, not vice versa.

    All the examples / tutorials sync objects and then syncing their variables, however, in my case all I want is the Host knows where the Peer is touching.

    My questions are:

    1. Do I 'have' to sync an object? can I simply sync Variables (or instance variables) ?
    2. How do I avoid syncing the host object to the peer? Let's say I only want the Peer object (or instance variables) to be sending data to the Host, not vice versa.

    I would appreciate if someone can list the minimum actions that I will require to do this.

    THanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To sync an input value, you usually want to use the "Add client input value" and "Set client state" actions. This is one way to the host.

    "Sync object" is generally used to update peers with information regarding position and creation and deletion of objects on the host. You can optionally also choose instance variables to sync with the "Sync instance variable" action. Again this is one way - peers will sync with a change on the host.

    Peers should not change their objects to send to the host, as you describe. Peers send their inputs to the host, who makes the change on the proper object based on the peer input. That object then gets synced with all the peers.

  • Thanks oosyrag ! That clears it up! I'll try this soon, if worked, I'll change the title of this post as [Solved].

    Cheers!

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