#How to sync a list<string>variable
1 messages · Page 1 of 1 (latest)
Painfully and with alot of networking heat
Anytime you need to make a change to the variable you must send that change to everyone
The most complicated part comes from syncing the list for players who have just joined
ill give it a shot
Who are you going to have sync the list when a player joins?
What happens if that player is frozen/crashes when that player joins? that data never gets synced and thus the player who joined never receives the data
the list doesnt need to be synced with anyone that joins in the future
just with the current players
then just sending the data over whenever making changes should be good enough
Why can’t we just have synced lists
Can’t you just use even receivers?
Because lists can can store so much and if you have to update it fir every player it’ll get laggy and the NET will go ⬆️
Its complicated because of mutable lists
With a synced variable or synced component, the only way to change them is via its chips, eg. a variable being set by the variable, or piston speed being set by Piston Set Speed
But, with a list variable, not only does it need to be synced after setting the variable, it also needs to be synced after modifying it with something like List Add