Error in Kill quest
Posted: Wed Mar 29, 2017 11:22 am
Hi,
I am trying to set up a normal kill quest.
This is what I did:
I added a variable wolfKills to the Variables tab

I have 3 Enemies that have a an increment on Destroy Script attached to them:

and I have this Quest here setup:

And I have this Diaolgue Entry that asks for this condition:

Quest["SaveMe"].State == "active" and Variables["wolfKills"]>=3
And I get this error message:
Dialogue System: Lua code 'return Quest["SaveMe"].State == "active" and Variables["wolfKills"]>=3' threw exception 'Lookup of field 'wolfKills' in the table element failed because the table element itself isn't in the table.'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:IsTrue(String, Boolean, Boolean)
If I remove the part (and Variables["wolfKills"]>=3) it does work. But I need to check if these nasty wolfs are dead or not.
What I am doing wrong. I allready spent half a day on that. In another forum post I have read, that the part with the tables means that the variable is not set. But as you can see I have set it. So....
Your help would be very much appreciated!!
I am trying to set up a normal kill quest.
This is what I did:
I added a variable wolfKills to the Variables tab

I have 3 Enemies that have a an increment on Destroy Script attached to them:

and I have this Quest here setup:

And I have this Diaolgue Entry that asks for this condition:

Quest["SaveMe"].State == "active" and Variables["wolfKills"]>=3
And I get this error message:
Dialogue System: Lua code 'return Quest["SaveMe"].State == "active" and Variables["wolfKills"]>=3' threw exception 'Lookup of field 'wolfKills' in the table element failed because the table element itself isn't in the table.'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:IsTrue(String, Boolean, Boolean)
If I remove the part (and Variables["wolfKills"]>=3) it does work. But I need to check if these nasty wolfs are dead or not.
What I am doing wrong. I allready spent half a day on that. In another forum post I have read, that the part with the tables means that the variable is not set. But as you can see I have set it. So....
Your help would be very much appreciated!!