Skip to content

SetInterfaceOptionsForAll

SetPlayerInterfaceOptions for everyone - and for whoever joins later.

The keys given become the setting for every connected player and for everyone who joins until the mode is reloaded; they replace what the mode set for any one player under those keys, and leave the player’s other keys alone. The keys, the values and their ranges are the ones of SetPlayerInterfaceOptions; "default" for a key takes it back to the option’s own default. The call is all or nothing, and the reasons are the same words.

SetInterfaceOptionsForAll(component, options)
Parameter Type
component string "chat", "scoreboard", "party", "nameplates", "hud" or "compass"
options table { key = value } - numbers, booleans and texts; "default" takes a key back to its default

true, or false, reason - the reason as a person reads it

-- the chat in the top-right corner with twelve lines, and a scoreboard that Tab opens and closes
function OnGameModeInit()
local ok, why = SetInterfaceOptionsForAll("chat", { anchor = "top-right", margin_x = 16, margin_y = 24, lines = 12 })
if not ok then Log("chat layout refused: " .. why) end
SetInterfaceOptionsForAll("scoreboard", { mode = "toggle", title = "The Kuttenberg Inn" })
end

SetPlayerInterfaceOptions · SetInterfaceForAll · the Interface group of the index