Code: Select all
Quest["Find_Apples"].State == "active"; Variable["Alert"] = "Quest: Find me some apples!"
Code: Select all
Quest["Find_Apples"].State == "active"; Variable["Alert"] = "Quest: Find me some apples!"
Code: Select all
Quest["Find_Apples"].State = "active"; Variable["Alert"] = "Quest: Find me some apples!"
Code: Select all
SetQuestState("Find Apples", "active"); Variable["Alert"] = "Quest: Find me some apples!"
Code: Select all
CurrentQuestState("Find Apples") == "unassigned"
I actually realized that before I saw this. Sorry for the dumb question. Thanks!Tony Li wrote:Hi,
Use a single equals sign to assign values:
Version 1.5.9 added a new Lua function SetQuestState that you might prefer to use:Code: Select all
Quest["Find_Apples"].State = "active"; Variable["Alert"] = "Quest: Find me some apples!"
The Lua wizards now use this function instead of setting the value directly. This also allows the new OnQuestStateChange message to work. And you don't need to fiddle with those underscore ( _ ) characters.Code: Select all
SetQuestState("Find Apples", "active"); Variable["Alert"] = "Quest: Find me some apples!"
There's also a new CurrentQuestState function to check the current quest state. But you still need to use double equals signs to test values (as compared to single equals to assign values):^ The condition above is true if the Find Apples quest is unassigned.Code: Select all
CurrentQuestState("Find Apples") == "unassigned"
If your quest is complete (i.e., the state is "success", "failure", or "done"), it should only show up in the quest tracker HUD if you've ticked Show Completed Quests. (And in this case it will show up in the Text style you've specified for Success Description or Failure Description on the Unity UI Quest Track Template.)garrett123 wrote:Another question is how to get rid of the "track ui"? It is supposed to be gone after I complete a gathering object quest.
Code: Select all
return CurrentQuestState("Find Apples")