UIDisplayMessage
void UIDisplayMessage(playergroup group, int area, text message);
Display a message in players UI
Parameters
- playergroup group
Group of players that are going to receive the message
- int area
Position where the message will be displayed. Available areas:
Integer GUI Name Message Area Constant 0 None 1 Chat Message c_messageAreaChat 2 Notice (Top Left) 3 Error, Red (Bottom Left) c_messageAreaError 4 Subtitle c_messageAreaSubtitle 5 Minimap / Cinematic (Covers the UI) c_messageAreaCinematic 6 Debug, (Bottom Left) c_messageAreaDebug Some other available areas: c_messageAreaObjective, c_messageAreaDirective, c_messgaeAreaWarning
See the attached file to have a preview
- text message
Message to be displayed. If you want to display a string, you first have to convert it with the function StringToText(string s)
Examples
- Example #1: Initialization Trigger
// Send a message to everyone in the subtitle area UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringToText("Hello From SC2 Mapster"));
- Example #2: Clear screen area
// Fill an area with a lot of blanks to remove all the messages // currently active in that area void UIClearScreenArea(int area) { int i = 0; while (i <= 20) { UIDisplayMessage(PlayerGroupAll(), area, StringToText(" ")); i += 1; } }
- 1 comment
- 1 comment
Facts
- Date created
- Mar 02, 2010
- Last updated
- May 08, 2010
- Reply
- #2
BanditKeith May 08, 2010 at 08:13 UTC - 0 likesIt's probably not a good idea to provide the hard coded numbers for the locations, since there is no guarantee that they will remain the same. The safer bet is to use the associated constants for each location.