Global chat by default for multiplayer?
Global chat by default for multiplayer?
I'm in the process of setting up a server for some friends where they have their own individual research by creating their own force when they join. However, due to the default chat only displaying to other players within the same force it's quite a bother to have to type '/shout' every time just to be able to talk to other players in the game. Is it possible to make it so that all players can see the chat without prefixing or the use of additional chat bars? Thanks in advance.
Re: Global chat by default for multiplayer?
Code: Select all
script.on_event(defines.events.on_console_chat, function(event)
local author = game.get_player(event.player_index)
for _, player in pairs(game.players) do
if player.force ~= author.force then
player.print(author.name .. ": " .. event.message, author.color)
end
end
end)
Re: Global chat by default for multiplayer?
Ah thanks, didn't realize that you could print to individual players.