Godot Version
` 4.3
Question
Hi, I’ve been using Godot for about six months, and I have a problem that I’ve been trying to solve for days. I created a board game where the players don’t spawn new nodes; instead, they are assigned to one of the cameras around the board.
The problem is when a peer moves and occupies a new cell. The host receives that information and can’t move to that cell with their figures. However, when Player 1 moves a figure to a new cell, the peer doesn’t get that info and can still move their figure to an already occupied cell.
Here’s the function:
@rpc("any_peer", "call_local", "reliable")
func mark_next_cell_unavailable(grid_position):
var next_position = grid_position + Vector3(-1, 0, 0)
if Main.arena_positions.has(next_position):
Main.arena_positions[next_position] = "unavailable"
When I added print statements for testing, I noticed that when the peer marks a cell as unavailable, I get two prints—one from the host and one from the peer. But when the host does it, I only see one print, which is why I believe the host isn’t triggering it on the peer.