π¦ Format text
π¦ Format text
The Format text block allows you to generate dynamic sentences by integrating variables into a model text (eg: *"Hello {{First name}}, you have {{Score}} points"*).
This block is particularly useful for constructing personalized messages without having to manually concatenate multiple textual elements.
π₯ Entries
- format (Text): The template text containing the variables to replace, framed by double braces (eg:
{{myVariable}}). The block automatically generates additional entries for each detected variable. - Dynamic variables (Text/Number/Boolean): Entries created automatically for each variable found in the model text (eg:
{{First Name}}generates aFirst Nameentry).
π€ Outings
- text (Text): The final result after replacing the variables with their respective values, ready to be used in other blocks.
π‘ Example of use
Scenario: Display a personalized welcome message with the player's score
- A player completes a game and obtains a score of 150 points.
- You want to display a message like "Congratulations Jean, you have obtained 150 points!".
- Add the Format Text block and configure the
formatentry with the text: *"Congratulations {{First Name}}, you have obtained {{Score}} points!"*. - The block automatically generates two entries:
First Name(Text) andScore(Number). - Connect the
First Nameentry to a variable containing "John" and theScoreentry to a variable containing 150. - The block outputs the text "Congratulations John, you have obtained 150 points!", which you can display in a speech bubble or a message.
βοΈ Technical Details
- Dynamic generation of entries: The block analyzes the model text and automatically creates the entries corresponding to the detected variables (e.g.:
{{myVariable}}β entrymyVariable). - Supported data types: Variables can be of type Text, Number or Boolean. The block automatically converts values ββto text for final assembly.
- Error handling: If a variable is not connected, it is replaced by an empty string in the final text.
Updated on: 04/03/2026
Thank you!
