Page 1 of 1
Can I change a Quest Field from within a conversation tree
Posted: Thu Jan 04, 2018 4:43 pm
by bluebuttongames
Like we can modify standard variables, can I modify a specific Quest field?
Thanks,
Re: Can I change a Quest Field from within a conversation tree
Posted: Thu Jan 04, 2018 7:08 pm
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.