RPG text scrolling using a rich text box

Hi there :slight_smile:

I’m working on a RPG project and I need some help for a little problem concerning my dialogue system.

I have a functional text scrolling system (letter by letter) working with a “text” component.

I have my text on my database, and in the blueprint, I get its length, I display the letters one by one, and when all the letters are shown, the player can skip the dialogue.

But now, I want to do the same thing with a “rich text box”, in order to have some words in color for example.

The problem is that the text scrolling is also displaying the tags (<OrangeText> My text </>) letter by letter, and my text appears correctly in orange only after the last tag symbole is displayed.

Any idea on how to fix this?

Thanks a lot!

ps: here is a little video to show you my problem: Radiant Dawn - Dialogues - YouTube

3 Likes

You should write a functions that detects the opening of a tag and if it does it should do something like this:

<OrangeText>M</>
<OrangeText>My</>
<OrangeText>My </>
<OrangeText>My t</>
<OrangeText>My te</>
<OrangeText>My tex</>
<OrangeText>My text</>

Can you share how your code works to evaluate the best time to include this case?

1 Like

Hello!

Here is my code:

Thanks!