Trying to use code to trigger a conversation
Posted: Mon Aug 29, 2022 8:40 am
I'm trying to write a C# scripts that can trigger a conversation based on an Int I created in the dialogue system.
So in my game the character has some chores to do. Each time he dose one the Variable associated with it ticks up by one in the Dialogue tab. Once this number reaches 18 I want to trigger a conversation.
So what i'm thinking is that I need a C# script that can keep track of the spastic Variable in the dialogue system, and when it reaches a threshold I then trigger the conversation in script. Then i'll destroy the triggering game object just to be safe.
The problem is that I don't know how to get access to my Variables in the dialogue tool.
So in my game the character has some chores to do. Each time he dose one the Variable associated with it ticks up by one in the Dialogue tab. Once this number reaches 18 I want to trigger a conversation.
So what i'm thinking is that I need a C# script that can keep track of the spastic Variable in the dialogue system, and when it reaches a threshold I then trigger the conversation in script. Then i'll destroy the triggering game object just to be safe.
The problem is that I don't know how to get access to my Variables in the dialogue tool.