How do I send Host animation to Peers?

  • The Host can see 'walk' animation from Peers, but when the Host moves, Peers can´t see the 'walk' animation.

    I alread try action Multiplayer-transmit message / Multiplayer.MyId, Multiplayer.PeerID, to peers it work fine, host player can see all fine.

    How can i make the Peers see when Host moves??

  • You need an event to trigger peer clients to update the animation of the host sprite. You can do it a few ways, like by message or by syncing a variable. Or have some other way for peers to detect if host is moving on their own, such as storing last position and compare with current position.

  • My friend, can I ask you to give me a example? What should I put on Peer Group?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It depends on how you are going to set it up. If you're syncing an "isMoving" instance boolean variable.

    For all the peers and host:

    + PlayerObject: [X] Is isMoving

    -> PlayerObject: Set animation to "Idle" (play from beginning)

    + PlayerObject: Is isMoving

    -> PlayerObject: Set animation to "Walk" (play from beginning)

    Then all you need is for the host to properly toggle the isMoving variable for each peer when they are moving or not.

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