Expressive Text on screen using Blueprints

๐Ÿ”€
The following guide shows you the simplest way to display text directly on-screen. You could also follow
๐Ÿฅค
Expressive Text inside UI
if you already have a โ€œmaster UIโ€ and want to display the text nested to it.
ย 
The simplest way to display text directly on screen is using the Blueprint Functions provided:
notion image
ย 
Hereโ€™s how we use them to display three sentences in subtitle style:
ย 
Open the level blueprint (Weโ€™re doing this on the level blueprint but you could do it from any other blueprint)
notion image
ย 
First, create 3 ExpressiveTextFields variables that are going to contain the 3 different sentences respectively:
notion image
And hereโ€™s the value for LineOne:
notion image
  1. Setting Default Style to โ€œSubtitlesโ€ since thatโ€™s the only style weโ€™re going to apply.
  1. On Alignment, we set the text to be centered at the bottom and apply a 10% of parent offset from the bottom โ€” check out
    ๐Ÿ“
    Justification, Alignment & Positioning
    to learn more about how these parameters work.
  1. Width Settings is set to only occupy 70% of the parent size (i.e. the game screen) so it overflows sooner and doesnโ€™t fill the screen with text from end-to-end.
  1. Justification is also set to center.
  1. Finally, we set the text to be whatever we want.
ย 
For LineTwo and LineThree we use the same settings as above, changing the text only.
ย 
Now itโ€™s time to plug these variables into the macro:
notion image
In the macro itself weโ€™re able to define how long to display the text for - something useful about this macro is that it only continues execution when the given time has passed, meaning we can chain them together to transition between sentences.
ย 
Now you can hit Play โ–ถ๏ธ and see the results:
notion image
ON THIS PAGE