[SOLVED] Using a variable as a string in the Quest[] list?
Posted: Thu Mar 10, 2016 3:59 am
I'm trying to create a "modular" dialogue tree where there will be information given based on a global variable that will be set with the quest name. So the dialogue tree will be filled in with it's description and such.
Now, I had it working if I did it like this (harcoded):
But I want it to have the dynamic quest lookup with the variable so I tried this:
and this doesn't work.
So in the Dialogue Text of one of the node I have: and this throws an error:
Thanks in advance
Now, I had it working if I did it like this (harcoded):
Code: Select all
Quest["Name_of_Quest"].Description
Code: Select all
Quest[Variable["Name_Of_Quest"]].Description
So in the Dialogue Text of one of the node I have:
Code: Select all
[lua(Quest[Variable["CurrentQuest"]].Description)]
Any idea how I can solve this? I'm kind of new and I can't see what I'm doing wrong.Dialogue System: Lua code 'return Quest[Variable["CurrentQuest"]].Description' threw exception 'Lookup of field 'Description' in the table element failed because the table element itself isn't in the table.'
Thanks in advance