Getting extra fields in quests from script

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Getting extra fields in quests from script

Post by timbecile »

Hey Tony,

I'm trying to create my own quest log, and I want to add some extra fields in the quest info (quest location, quest giver) - I know you can add extra fields in the quest itself, but is there a way to get that data back out via script?
User avatar
Tony Li
Posts: 21061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Getting extra fields in quests from script

Post by Tony Li »

Hi,

Yes, use the DialogueLua class. Example:

Code: Select all

string questLocation = DialogueLua.GetQuestField("Some Quest", "Location").asString;
string questGiver = DialogueLua.GetQuestField("Some Quest", "Quest Giver").asString;
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: Getting extra fields in quests from script

Post by timbecile »

worked great! Thanks!
User avatar
Tony Li
Posts: 21061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Getting extra fields in quests from script

Post by Tony Li »

Glad to help!
Post Reply