player.set_round_card_title
This function sets the text of the round card. If the text passed in differs from that used in the previous frame, then this function will also trigger display of the round card.
Arguments
- text
A string literal or an integer constant denoting a string index, optionally followed by up to two variables passed as additional arguments, which will be substituted into the string when it is displayed.
Example
-- -- Slayer TU round card description code: -- for each player do -- round card if game.score_to_win != 0 and game.teams_enabled == 1 then current_player.set_round_card_title("Kill players on the enemy team.\r\n%n points to win.", game.score_to_win) end if game.score_to_win != 0 and game.teams_enabled == 0 then current_player.set_round_card_title("Score points by killing other players.\r\n%n points to win.", game.score_to_win) end if game.score_to_win == 0 and game.teams_enabled == 1 then current_player.set_round_card_title("Kill players on the enemy team.") end if game.score_to_win == 0 and game.teams_enabled == 0 then current_player.set_round_card_title("Score points by killing other players.") end end
Notes
Only the first 116 characters of the specified string will be displayed; this limitation applies after all format string parameters are substituted in. It seems that the UI reserves room for 117 characters, including an invisible "end of text" marker.
Text does not word wrap automatically; you must insert line breaks manually. The font used to display the text is "TV Nord;" there are font preview websites that you can use to compare line lengths and save yourself a bit of trial and error.