Workshop.codes
Create

Small Message Last updated May 24, 2025

Description

Displays a small message beneath the reticle that is visible to specific players.

Snippet

Small Message(All Players(All Teams), Custom String("Hello World"));

Properties

Returns: Void
Parameters: Visible To, Header

Visible To
Type: Player | Array (Player), Default: All Players
One or more players who will see the message.

Header
Type: Object, Default: String
The message to be displayed.

Examples

Small Message(Event Player, Custom String("  {0} I am hero Tracer", Hero Icon String(Hero(Tracer))));

In small messages, you can use "{}" curly brackets to insert a variables, icons, or strings.
Note the 2 spaces before the "{0}" which center it properly.

Example 1

rule("welcome to the server!")
{
    event
    {
        Ongoing - Each Player;
        All;
        All;
    }
    conditions
    {
        Has Spawned(Event Player) == True;
    }
    actions
    {
        Small Message(Event Player, Custom String("  {0} I have joined the server!", Hero Icon String(Hero Of(Event Player))));
        Wait(4, Ignore Condition);
        Small Message(Event Player, Custom String("  {0} I have {1} points and {2} hit points", Hero Icon String(Hero Of(Event Player)),
            Event Player.A, Health(Event Player)));
    }
}
  
This sends 2 messages, with 4 seconds of a wait, and uses several different syntax. while also keeping the double space at the front.
Example 2

rule("Setup")
{
    event
    {
        Ongoing - Global;
    }
    actions
    {
        Global.A = False;
        Global.B = Empty Array;
        Global.C = Array(Vector(0, 0, 0), Vector(0, 0, 0), Vector(0, 0, 0));
        Small Message(Host Player, Custom String("  Setup initialized"));
    }
}
  
This example, is to show that you can use small messages to troubleshoot your code and see if something is executing or not. good for debugging.
Example 3

rule("Rule 1")
{
    event
    {
        Ongoing - Each Player;
        All;
        All;
    }
    conditions
    {
        Distance Between(Event Player, Vector(0, 0, 0)) < 2;
    }
    actions
    {
        Small Message(Event Player, Custom String("  You Found the small message! "));
    }
}
  
In this example if the user gets close to a specified vector you get a small message.

Trivia

  • Line break "\n" will not display the new line, but will create it.
  • To fix an alignment bug with small messages, use 2 spaces before the message in order for it to be centered properly.
  • Only displayable for 4 seconds. Not modifiable.
  • Spamming can result in removing viewing players from lobby.
Workshop.codes