How can you update a value for one of the extra settings? As a practical example let say you have this:
When editing I tried to do the following:
On the host side the value for Code
does get updated to the new random string when calling
But unfortunately on client side it still gets the original value which means that this isn’t the way to do it, so how is it the correct way to do it?
Also @mordentral, is it possible to add a Make Literal Session Property Array String (/the other types)? Right now I can kinda simulate an array by adding a separator between the values, but having an array would be better for working with the value.
Thank you for the plugin!
//Edit1: After some more testing the Extra Settings
values do get changed for the session itself, only that the changes are not replicated automatically to everyone, but new players that join the session will have the updated values.
//Edit2: I tired to add inside the controller the function that changes the value and be called on each player controller, but still the same, the value does not change on connected clients, only on new clients.
So I guess one way to solve this problem would be to save those settings as variables inside the Game State
and when the host changes some settings related to the session, change the variables inside the Game State
as well, to reflect the new changes.
One situation is that you add a password for the session and give the option to change the password once the session is started. You will save that password as a Make Literal Session Property String
inside the Extra Settings
but also inside the Game State
. When a player wants to join the session you will check the password from Extra Settings
with what he/she is giving. If it is correct then he/she can join. Now when the host changes the password, you will update the value inside the session Extra Settings
which in turn will be updated for new players that join, but also update the value inside Game State
. This value will be used by the rest of the players so they have an option to share the password for the session as well, and not only the host.