Ensuring sync is successful/completed before an operation?

Godot Version

v4.2.1.stable.official [b09f793f5]

Question

Context: The game is a multiplayer tactics game with turn queue similar to FF7. 4 characters per player, 2 players.

Each character has 3 multiplayer synchronized stats using Godot’s MultiplayerSynchronizer node:

  • Readiness (R) - how far a character is from taking a turn
  • Speed (S) - the rate at which Readiness fills up
  • Time (T) - multiplier required to achieve a turn

At the start of each turn, I have each character compute and update its own T, assuming that it’ll be synced between the 2 players automatically. Then, off of that I sort the characters and get the one with smallest T value to say the next turn belongs to it.

My issue is that sometimes, one of the clients does the sorting of characters according to T value even BEFORE the T values have been fully updated and synced across all the characters between the 2 players; which in turn leads to de-sync between the 2 players.

I’m looking for suggestions around this topic, been stuck for 3 days trying different solutions out to no avail. :frowning: Thank you so much in advance! :smiley: