# Chat Message

Grammar — Player p types a chat message containing s, matching exact|Exactly/Partially
FlagsNative | Event

This event fires when the specified chat message is typed by the specified player. If exact match is selected, then the string the player enters must be identical to the specified string for the event to fire. If partial match is selected, then the event will fire if the player enters the specified string plus any number of additional characters after it. Use the “Chat String” function to refer to the message being entered. Use “Triggering Player” to get the player that typed the message.

# Arguments

Returns — void

native void TriggerAddEventChatMessage(
	trigger t,
	int player,
	string inText,
	bool exact,
);

# Event parameters

Category: Game / Chat And Console

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L4160
TriggerAddEventChatMessage(gt_Debug_Sin, 1, "sine", true)
// L4186
TriggerAddEventChatMessage(gt_Debug_LeaveBehind, 1, "behind", true)
// L4212
TriggerAddEventChatMessage(gt_Debug_MoveBG, 1, "-mb", true)
// L4252
TriggerAddEventChatMessage(gt_Debug_BOSS, 1, "-BOSS", true)
// L4292
TriggerAddEventChatMessage(gt_Debug_LEVELCLEAR, 1, "-LEVELCLEAR", true)
// L4323
TriggerAddEventChatMessage(gt_Debug_Bonus, 1, "-BONUS", false)
// L4355
TriggerAddEventChatMessage(gt_Debug_PowerUp, 1, "-pu", false)
// L4382
TriggerAddEventChatMessage(gt_Debug_Life, c_playerAny, "-LIFE", true)
// L4410
TriggerAddEventChatMessage(gt_Debug_Cineamtic, c_playerAny, "-end", true)
// L4436
TriggerAddEventChatMessage(gt_Debug_SS, c_playerAny, "-ss", false)
// L1225
TriggerAddEventChatMessage(gt_DEBUGShortenTime, c_playerAny, "short", true)
// L15320
TriggerAddEventChatMessage(gt_DebugEnabledLookAt, 1, "ENABLELOOKAT", true)
// L15347
TriggerAddEventChatMessage(gt_DebugDisabledLookAt, 1, "DISABLELOOKAT", true)
// L17609
TriggerAddEventChatMessage(gt_EnableDebug, 1, "enabledebug", true)
// L17635
TriggerAddEventChatMessage(gt_DisableDebug, 1, "disabledebug", true)
// L17805
TriggerAddEventChatMessage(gt_TerranUptheNight, c_playerAny, "OverEngineeredCodPiece", true)
// L18065
TriggerAddEventChatMessage(gt_DebugROOM, 1, "ROOM", true)
// L18091
TriggerAddEventChatMessage(gt_DebugROOMCHEAT, 1, "ROOMCHEAT", true)
// L18125
TriggerAddEventChatMessage(gt_DebugTESTCAMERA, 1, "TESTCAM", false)
// L18154
TriggerAddEventChatMessage(gt_DebugGAMECAMERA, 1, "GAMECAMERA", true)
// L18180
TriggerAddEventChatMessage(gt_DebugGLOBALVIEW, 1, "GLOBALVIEW", true)
// L4160
TriggerAddEventChatMessage(gt_Debug_Sin, 1, "sine", true)
// L4186
TriggerAddEventChatMessage(gt_Debug_LeaveBehind, 1, "behind", true)
// L4212
TriggerAddEventChatMessage(gt_Debug_MoveBG, 1, "-mb", true)
// L4252
TriggerAddEventChatMessage(gt_Debug_BOSS, 1, "-BOSS", true)
// L4292
TriggerAddEventChatMessage(gt_Debug_LEVELCLEAR, 1, "-LEVELCLEAR", true)
// L4323
TriggerAddEventChatMessage(gt_Debug_Bonus, 1, "-BONUS", false)
// L4355
TriggerAddEventChatMessage(gt_Debug_PowerUp, 1, "-pu", false)
// L4382
TriggerAddEventChatMessage(gt_Debug_Life, c_playerAny, "-LIFE", true)
// L4410
TriggerAddEventChatMessage(gt_Debug_Cineamtic, c_playerAny, "-end", true)
// L4436
TriggerAddEventChatMessage(gt_Debug_SS, c_playerAny, "-ss", false)
// L1225
TriggerAddEventChatMessage(gt_DEBUGShortenTime, c_playerAny, "short", true)
// L15320
TriggerAddEventChatMessage(gt_DebugEnabledLookAt, 1, "ENABLELOOKAT", true)
// L15347
TriggerAddEventChatMessage(gt_DebugDisabledLookAt, 1, "DISABLELOOKAT", true)
// L17609
TriggerAddEventChatMessage(gt_EnableDebug, 1, "enabledebug", true)
// L17635
TriggerAddEventChatMessage(gt_DisableDebug, 1, "disabledebug", true)
// L17805
TriggerAddEventChatMessage(gt_TerranUptheNight, c_playerAny, "OverEngineeredCodPiece", true)
// L18065
TriggerAddEventChatMessage(gt_DebugROOM, 1, "ROOM", true)
// L18091
TriggerAddEventChatMessage(gt_DebugROOMCHEAT, 1, "ROOMCHEAT", true)
// L18125
TriggerAddEventChatMessage(gt_DebugTESTCAMERA, 1, "TESTCAM", false)
// L18154
TriggerAddEventChatMessage(gt_DebugGAMECAMERA, 1, "GAMECAMERA", true)
// L18180
TriggerAddEventChatMessage(gt_DebugGLOBALVIEW, 1, "GLOBALVIEW", true)

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L12001
TriggerAddEventChatMessage(libCamp_gt_chatbubbledebug, 1, "-cb", true)
// L12784
TriggerAddEventChatMessage(libCamp_gt_Debug_Preloading, 1, "-preload", true)
// L13025
TriggerAddEventChatMessage(libCamp_gt_TS_FlyingOutHouse, c_playerAny, "OUTHOUSE", true)
// L13052
TriggerAddEventChatMessage(libCamp_gt_TS_TerranUpTheNight, c_playerAny, "OverEngineeredCodPiece", true)
// L13081
TriggerAddEventChatMessage(libCamp_gt_TS_Temp, c_playerAny, "-ts", true)
// L13423
TriggerAddEventChatMessage(libCamp_gt_TS_DebugPROGRESSDevelop, c_playerAny, "PROGRESS", true)
// L13549
TriggerAddEventChatMessage(libCamp_gt_TS_DebugResearchPanel, 1, "RESEARCHS", true)
// L13767
TriggerAddEventChatMessage(libCamp_gt_TS_DebugMercenaryPanel, 1, "MERCENARY", true)
// L14036
TriggerAddEventChatMessage(libCamp_gt_DebugBUYTECH, 1, "TECH", false)
// L14037
TriggerAddEventChatMessage(libCamp_gt_DebugBUYTECH, 1, "BUYTECH", false)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L771
TriggerAddEventChatMessage(gt_DebugHunter, c_playerAny, "EVO2", true)
// L772
TriggerAddEventChatMessage(gt_DebugHunter, c_playerAny, "s2", true)
// L879
TriggerAddEventChatMessage(gt_SkiptoPart2, c_playerAny, "EVO2", true)
// L880
TriggerAddEventChatMessage(gt_SkiptoPart2, c_playerAny, "s2", true)
// L879
TriggerAddEventChatMessage(gt_DEBUGSkiptoPart2, c_playerAny, "EVO2", true)
// L880
TriggerAddEventChatMessage(gt_DEBUGSkiptoPart2, c_playerAny, "s2", true)
// L659
TriggerAddEventChatMessage(gt_DEBUGCorpser, c_playerAny, "evo1", true)
// L660
TriggerAddEventChatMessage(gt_DEBUGCorpser, c_playerAny, "s1", true)
// L686
TriggerAddEventChatMessage(gt_DEBUGVile, c_playerAny, "evo2", true)
// L687
TriggerAddEventChatMessage(gt_DEBUGVile, c_playerAny, "s2", true)
// L683
TriggerAddEventChatMessage(gt_DEBUGStage2, c_playerAny, "evo2", true)
// L684
TriggerAddEventChatMessage(gt_DEBUGStage2, c_playerAny, "s2", true)
// L746
TriggerAddEventChatMessage(gt_Stage2Torrasque, c_playerAny, "EVO2", true)
// L747
TriggerAddEventChatMessage(gt_Stage2Torrasque, c_playerAny, "s2", true)
// L773
TriggerAddEventChatMessage(gt_DEBUGRaptor, c_playerAny, "raptor", true)
// L774
TriggerAddEventChatMessage(gt_DEBUGRaptor, c_playerAny, "s1", true)
// L810
TriggerAddEventChatMessage(gt_DEBUGSwarmlingQ, c_playerAny, "EVO2", true)
// L811
TriggerAddEventChatMessage(gt_DEBUGSwarmlingQ, c_playerAny, "s2", true)
// L1158
TriggerAddEventChatMessage(gt_CHEAT100Eggs, gv_pLAYER_01_USER, "s2", true)
// L1159
TriggerAddEventChatMessage(gt_CHEAT100Eggs, gv_pLAYER_01_USER, "100eggs", true)
// L1462
TriggerAddEventChatMessage(gt_DEBUGMidCine, c_playerAny, "s2", true)
// L1463
TriggerAddEventChatMessage(gt_DEBUGMidCine, c_playerAny, "Stage2", true)
// L1723
TriggerAddEventChatMessage(gt_DEBUGStage2, c_playerAny, "Stage2", true)
// L1724
TriggerAddEventChatMessage(gt_DEBUGStage2, c_playerAny, "S2", true)
// L1755
TriggerAddEventChatMessage(gt_DEBUGStartBlizzard, c_playerAny, "blizzardgo", true)
// L1786
TriggerAddEventChatMessage(gt_DEBUGStartSnow, c_playerAny, "snowgo", true)
// L1815
TriggerAddEventChatMessage(gt_DEBUGStopSnow, c_playerAny, "snowdie", true)
// L1322
TriggerAddEventChatMessage(gt_DEBUGSkiptoPart2, c_playerAny, "s2", true)
// L1378
TriggerAddEventChatMessage(gt_DEBUGSkiptoPart3, c_playerAny, "s3", true)
// L1356
TriggerAddEventChatMessage(gt_DEBUGStage2, c_playerAny, "s2", true)
// L978
TriggerAddEventChatMessage(gt_S2, c_playerAny, "s2", true)
// L1507
TriggerAddEventChatMessage(gt_DEBUGStage2, c_playerAny, "s2", true)
// L1567
TriggerAddEventChatMessage(gt_DEBUGStage4, c_playerAny, "s4", true)
// L1622
TriggerAddEventChatMessage(gt_DEBUGStage6, c_playerAny, "s6", true)
// L1650
TriggerAddEventChatMessage(gt_DEBUGStage357, c_playerAny, "s3", true)
// L1651
TriggerAddEventChatMessage(gt_DEBUGStage357, c_playerAny, "s5", true)
// L1652
TriggerAddEventChatMessage(gt_DEBUGStage357, c_playerAny, "s7", true)
// L1598
TriggerAddEventChatMessage(gt_DebugStage2, c_playerAny, "s2", true)
// L1492
TriggerAddEventChatMessage(gt_DEBUGStartS02, c_playerAny, "s2", true)
// L1538
TriggerAddEventChatMessage(gt_DEBUGStartS03, c_playerAny, "s3", true)
// L1590
TriggerAddEventChatMessage(gt_DEBUGStartS04, c_playerAny, "s4", true)
// L1723
TriggerAddEventChatMessage(gt_DEBUGStartArchangelBossFight, c_playerAny, "boss", true)
// L1724
TriggerAddEventChatMessage(gt_DEBUGStartArchangelBossFight, c_playerAny, "s5", true)
// L1599
TriggerAddEventChatMessage(gt_DEBUG_SkipTimer, c_playerAny, "s2", true)
// L1731
TriggerAddEventChatMessage(gt_Debug_FirstBaseSetup, c_playerAny, "s2", true)
// L1761
TriggerAddEventChatMessage(gt_Debug_FullPower, c_playerAny, "FullPower", true)
// L1798
TriggerAddEventChatMessage(gt_Debug_Experience, c_playerAny, "EXPGAINED", false)
// L1328
TriggerAddEventChatMessage(gt_DEBUGStage2, c_playerAny, "s2", true)