Accessing Quest variable from lua inside the db editor

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Accessing Quest variable from lua inside the db editor

Post by Tony Li »

I think another problem is that I misread your original post!

Instead of a variable in the Variables section, you added custom fields to your quest in the Quest/Items section, like this:

Image

To show the value of the custom field "Stars" in your Dialogue Text or in the quest log window or quest tracker HUD, you'll need to use [lua(code)] instead of [var=variable]:
  • Dialogue Text: "You have [lua(Quest["Befriend_the_Police"].Stars)] stars."
Post Reply