player.set_objective_text
a.k.a. player.set_round_card_titleTypically, at the start of a round in most game modes, the player sees a small informational popup with a brief blurb describing their objective; this is unofficially called the "round card." This function sets the body text for 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
The description text to display. This is a persistent format string.
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
The alternate name for this function,
set_round_card_title
, originates from the oldest versions of ReachVariantTool. It is unintuitive and considered deprecated.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.