Re: Player position during the conversation
Posted: Fri Apr 27, 2018 8:32 am
Oh, good! Thank you, I am gonna try it. I was waiting for you)) All day working on that)Tony Li wrote: ↑Fri Apr 27, 2018 8:28 am Hi,
Here are a few notes that should get it working:
1. Conditions are not observed on the START node.
2. The error message "Invoke function call on non function value" means the the Dialogue System did not find a quest named "FirstMeet". Is it perhaps named "First Meet" (with a space) or "firstMeet" or something like that? It's also possible, depending on how your scene is set up, that the quest database isn't fully loaded yet. If this is the case, you can wait until the end of the frame:
3.. You can add a Condition variable to your script:Code: Select all
IEnumerator Start() { yield return new WaitForEndOfFrame(); if (Lua.IsTrue(luaCode)) StartConversation("foo"); }
If you don't want the full Condition, you can use the tag [LuaConditionWizard] to get the Lua wizard:Code: Select all
public class ConversationInstance : MonoBehaviour { public string conversation; public Transform actor; public Transform conversant; public Condition condition; void Start() { if (condition.IsTrue(actor)) DialogueManager.StartConversation(conversation, actor, conversant); } }
Code: Select all
[LuaConditionWizard] public string luaCodel