Function DisplayTimedTextFromPlayer

  • Displays a trigger message to all players but the first "%s" in the message will be replaced by GetPlayerName(toPlayer).

    Parameters

    • toPlayer: Player<PlayerEventMap>

      this player's name will be used to replace the %s placeholder

    • x: number

      new text box position (default is 0, clamped to: 0.0-1.0)

    • y: number

      new text box position (default is 0, clamped to: 0.0-1.0)

    • duration: number

      text lifetime in seconds

    • message: string

      text (supports color codes), may contain only one %s placeholder

    Returns void

    Bug

    Only the first "%s" will be replaced correctly. Following "%s" will be printed as garbage or (v1.32.10, Lua) crash the game.

    Using formatters like "%i" will also print garbage and following "%s" wont work either.

    See: C stdlib printf documentation.

    Note

    A better name for the parameter toPlayer would be fromPlayer.

    Note

    See: DisplayTextToPlayer for the full description. Also: DisplayTimedTextToPlayer, BlzDisplayChatMessage.

Generated using TypeDoc