A clientPrivate state variable is only sent to the client whose avatar that is. In other words, clientPrivate variables on a player entity are only updated to that player - other clients will not see a value for that variable on that entity. (Note that clientPrivate has no effect on non-player entities.) Of course, the server sees all of the values (and when it updates one, the update is only sent to that player).
Here is an example of how to add such a variable to a logic entity class:
- secretItem: new StateString({ clientPrivate: true }),
No comments:
Post a Comment