IncrementOnDestroy
Posted: Thu Mar 18, 2021 11:14 am
I'm using IncrementOnDestroy for a kill quest in my game, however, whenever I try to use QuestConditions to check something, it references the demo scene quests (such as 'Get the Launch Codes'). I'm not sure why it's referencing that database and not my own quests. Also the variables from the demo scene appears (like 'hasLaunchCodes') as well as my own variables ('Kills'). I have the IncrementOnDestroy script attached to my enemies, which does increment the kill count, however I'm trying to trigger an event whenever the enemy is killed or if all the enemies are killed.
I was also wondering if there is a way to check the current quest conditions apparat from using the Dialogue System Trigger. For example: I would like to constantly check this lua condition:
Variable["Kills"] >= 5
And if true, run this method (or my own method via a unity event, such as disabling a UI element, etc):
SetQuestState("Clear the Farm area", "success")
I tried using the Dialogue System Trigger to check this condition, but it only has triggers for OnStart or OnTriggerEnter. I'm trying to use something like OnUpdate to always check if the condition is true. Thanks!
I was also wondering if there is a way to check the current quest conditions apparat from using the Dialogue System Trigger. For example: I would like to constantly check this lua condition:
Variable["Kills"] >= 5
And if true, run this method (or my own method via a unity event, such as disabling a UI element, etc):
SetQuestState("Clear the Farm area", "success")
I tried using the Dialogue System Trigger to check this condition, but it only has triggers for OnStart or OnTriggerEnter. I'm trying to use something like OnUpdate to always check if the condition is true. Thanks!