Suspend a conversation until variable has a certain value
Posted: Fri Nov 06, 2020 2:04 pm
Hello,
In my game I have kind of tutorial in which NPC talks to Player. During tutorial there are few gameplay objectives that player needs to complete in order to proceed with the tutorial (conversation with NPC). So my goal is to make a simple sequence: Listen to NPC -> Dialogue UI is hidden -> Player completes objective -> Dialogue with NPC resumed and new cycle starts -> ....
To track player progress I made a variable inside DialogueManager: Then, after player completes the task, I'm setting gameplayProgress variable value from code:
And finally, I'm setting gameplayProgress check in Conditions for dialogue entry which should appear only after Player completes an objective, and gameplayerProgress is set to 1 or higher.
But when dialogue reaches Dialogue Entry with unsatisfied condition Dialogue is simply terminated. What I wanted instead, is temporary hide dialogue UI until variable in Conditions is changed. Am I doing it right, or there is another proper way to implement what I want?
In my game I have kind of tutorial in which NPC talks to Player. During tutorial there are few gameplay objectives that player needs to complete in order to proceed with the tutorial (conversation with NPC). So my goal is to make a simple sequence: Listen to NPC -> Dialogue UI is hidden -> Player completes objective -> Dialogue with NPC resumed and new cycle starts -> ....
To track player progress I made a variable inside DialogueManager: Then, after player completes the task, I'm setting gameplayProgress variable value from code:
Code: Select all
DialogueLua.SetVariable("gameplayProgress", objectiveIndex);