RESOLVED - Syncing values seems to work for host, but not peer in coop game

I seem to be having trouble syncing some values across an MP game.
Here is the setup.
The game is a 2D belt scrolling beat em up.
I have 1 enemy in the game. The host is connected, and a peer is connected.
The player can walk into the enemy, and the collision calls code to say the enemy is being grappled. This changes their state and animation.

Now, when the host walks into the enemy, the state and animation change correctly, and the host and connected peer can see it. However, when the connected peer walks into the same enemy, only that peer can see that the state and animation of the enemy has changed, the host cannot see this change.
Any idea what that would be? The values sync when the host grapples but not when the connected peer grapples?
Allow the below screenshot using Streets of Rage sprites to illustrate. The top image is the Host view. The bottom image is the peer view. So the enemy is seen grappled for the peer (green player), but not the host

In contrast, when the host (red player) grappled the enemy, both see it

There is no code on the enemy that is setting the state at any time, other than when the grapple occurs.

Any ideas? I’m not getting far with this MP business and it’s stumping me at every turn.
This problem is similar to my other problem, but here I am not calling functions on peers, I’m wanting the values set on an AI enemy to sync across the games.
Thanks in advance.

The solution was the same as this thread Difficulty with calling functions on peers in Coop fighting game - RESOLVED - #13 by Stephen_Watson

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms