From 4312f998c4f5f524a751e9125adc5671e5ca3e1b Mon Sep 17 00:00:00 2001 From: Lugghawk Date: Sat, 5 Jan 2019 21:27:00 -0500 Subject: [PATCH] Adds messageToCoalition --- hoggit/communication.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hoggit/communication.lua b/hoggit/communication.lua index 75d1bd1..be8961a 100644 --- a/hoggit/communication.lua +++ b/hoggit/communication.lua @@ -50,3 +50,13 @@ HOGGIT.MessageToAll = function(text, displayTime) if not displayTime then displayTime = 10 end trigger.action.outText(text, displayTime) end + + +--- Send a message to all players in the given coalition +-- @param coalition The coalition to send to (0 = neutral, 1 = red, 2 = blue) +-- @param text The text that is shown in the message +-- @param displayTime Amount of time in seconds to show the message +HOGGIT.MessageToCoalition = function(text, displayTime, coalition) + if not displayTime then displayTime = 10 end + trigger.action.outTextForCoalition(coalition, text, displayTime) +end