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](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F89b0b766-b731-4029-ba70-8b73d0e6f204%2FUntitled.png?table=block&id=d2d1daaf-8424-4107-914b-7818639ac234&cache=v2)
ย
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](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe857a6e4-06ab-4ad8-9662-eaa48c30cf1b%2FUntitled.png?table=block&id=83178bb6-1c5c-4c63-b811-90d7727f8188&cache=v2)
ย
First, create 3 ExpressiveTextFields variables that are going to contain the 3 different sentences respectively:
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8f7ce1db-fbaa-47f7-b97d-89320d28ac56%2FUntitled.png?table=block&id=3d1aff46-cc63-4a28-b696-4fc9acb79661&cache=v2)
And hereโs the value for LineOne:
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F95f0b89d-a566-456c-be8d-84e8d2bb0827%2FUntitled.png?table=block&id=ed95653f-96a5-433f-9200-3ef8077e2aa3&cache=v2)
- Setting Default Style to โSubtitlesโ since thatโs the only style weโre going to apply.
- 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.
- 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.
- Justification is also set to center.
- 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](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F1311f8c5-a79a-4a12-8460-dcbb6e55de1b%2FUntitled.png?table=block&id=3331a763-0f2b-4727-8635-e9cbfda3c4d6&cache=v2)
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](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff6dbdaad-64ae-4dfa-9fde-6daac77895cd%2FPreview.gif?table=block&id=5a671c75-084c-4e16-998d-193ecb0a53fa&cache=v2)