Compile quest text for custom text fields

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
kimosabe
Posts: 22
Joined: Tue Aug 09, 2022 7:19 pm

Compile quest text for custom text fields

Post by kimosabe »

Hi,

I have the following problem when trying to display quest status to a custom text field:

Image

Is there a way (class) for compiling text and replacing every [var=""] with the actual variable value?

Thanks,
Kimo
User avatar
Tony Li
Posts: 21965
Joined: Thu Jul 18, 2013 1:27 pm

Re: Compile quest text for custom text fields

Post by Tony Li »

Hi,

Yes. Run the text through FormattedText.ParseCode(). This will replace [var=variable] and [lua(code)] tags with their values.
Post Reply