ID:156887
 
I'm trying to make it so that when I change something via winset() it will apply to everyone. Say for instance I make a label visible or change the text of a label this will be visible for all players. I thought about running a loop for all players, and when a player logs in to check to set what is visible and what the text says and set it for them. However this seems unproductive and I'm sure that must be another way.
winset() only works per client. Think of it like setting a variable. You can't set a variable for multiple people all at once, unless you put it in a loop through affected people.
In response to Kaiochao (#1)
Could you do something like

for(client in world)


?
In response to Darkjohn66 (#2)
Nope, since in world is equal to in world.contents, and the list world.contents only contains /atom types. Therefore, no clients.

However, you can always use a global-objects loop instead of a objects-in-list loop, by not supplying a list, therefore omitting the 'in' part. It works in hand with most any type.

var/list/XYZ
for(XYZ) //loop through every /list in existence

for(var/client/X) //loop through every /client