I’m really struggling with Godot Multiplayer and could do with some help.
Every time I think I know what’s going on, I don’t.
Given this scenario, what is the best way to sync it across players?
I have a 2 player co-op game.
Each player has their own authority set, so only that machine can run the code for that player
Player 2 (peer) walks into the enemy and grabs them.
The player then calls the grab code on the enemy.
The enemy only reacts on player 2’s screen. Player 1 isn’t running this code. It seems to be because the player script has multiplayer authority set, so only one machine (peer) is running the code and the host won’t.
The enemy does have the animation on sync, so when the enemy animation reacts to the grab on player 2’s (peer) machine, shouldn’t it sync to player 1s machine (host)? Because it doesn’t seem to be doing that
I must be going about this whole approach wrong. The basic idea is
I want the enemy to react to a grapple when either player collides with them, and for the enemy reaction to be synced across both screens.
I can move the code to the Area2d that detects the collision, that way it’s not affected by multiplayer authority.
I just can’t understand why the enemy values aren’t syncing from player 2’s machine to player 1’s machine.
Thanks in advance