Can I change a Quest Field from within a conversation tree

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
bluebuttongames
Posts: 91
Joined: Tue Jul 14, 2015 8:22 am

Can I change a Quest Field from within a conversation tree

Post by bluebuttongames »

Like we can modify standard variables, can I modify a specific Quest field?

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

Re: Can I change a Quest Field from within a conversation tree

Post by Tony Li »

Sure! You can't do it through the Lua wizard's dropdowns, but you can enter it manually in the Script field.

For example, say you have a quest named "Shootout" and you want to change the quest's Display Name:

Code: Select all

Quest["Shootout"].Display_Name = "High Noon"
Or say you've added a new field named Attempts that keeps track of the number of times the player has attempted the quest. In the line where the player accepts the quest, you can increment Attempts by setting Script to:

Code: Select all

Quest["Shootout"].Attempts = Quest["Shootout"].Attempts + 1
Now if want to change a field in an Actor or Item, you can do that with the Lua wizard's dropdowns. The dropdowns for Quests are simplified, though, and don't expose the ability to set arbitrary fields.
Post Reply