Hello again.
I've made a simple variable wich does turn the component light on, but, when i introduce the condition, it stops working, the code seems to be fine, what am i doing wrong?
Thanks
A condition for a Variable
Re: A condition for a Variable
Hi,
In play mode, please inspect the Dialogue System Trigger. It will show the result of checking the Condition. It will either be True (in green) or False (in red):
Is it possible that the variable is not true before the Dialogue System Trigger starts?
Also, are there any specific scenarios in which this happens? For example, only when loading a saved game?
In play mode, please inspect the Dialogue System Trigger. It will show the result of checking the Condition. It will either be True (in green) or False (in red):
Is it possible that the variable is not true before the Dialogue System Trigger starts?
Also, are there any specific scenarios in which this happens? For example, only when loading a saved game?
Re: A condition for a Variable
The Dialoge system shows it as false, the whatch as true.
Yes, the variable is false when the Dialogue System Trigger starts.
Yes, the variable is false when the Dialogue System Trigger starts.
Re: A condition for a Variable
Hi,
The Watches section will show the runtime value. You may need to click Update or turn on Auto-Update to see the current value.
If so, then the Dialogue System Trigger will not fire because the Condition will not be met.
If you want the Dialogue System Trigger to fire after you set the variable to true, then change the Dialogue System Trigger to OnUse. After you set the variable to true, call the Dialogue System Trigger's OnUse() method.
The Variables section will always show the original, design-time value.
The Watches section will show the runtime value. You may need to click Update or turn on Auto-Update to see the current value.
Do you want the variable to be false when the scene starts?
If so, then the Dialogue System Trigger will not fire because the Condition will not be met.
If you want the Dialogue System Trigger to fire after you set the variable to true, then change the Dialogue System Trigger to OnUse. After you set the variable to true, call the Dialogue System Trigger's OnUse() method.
Re: A condition for a Variable
I really don't want to ask, but i just can't make it work.
I tried to call the OnUse triger and OnConversationStart but i haven't managed to do so, is it explained in the documentation somewhere?
I have made a small proyect with the issue alone, if it helps to explain what i'm stuck with.
[link removed]
I tried to call the OnUse triger and OnConversationStart but i haven't managed to do so, is it explained in the documentation somewhere?
I have made a small proyect with the issue alone, if it helps to explain what i'm stuck with.
[link removed]
Re: A condition for a Variable
Hi,
Thank you for sending the example project. I'm back in the office and responding to posts as quickly as I can.
In your example, the second Dialogue System Trigger is set to On Conversation Start. This means it will try to work as soon as the conversation starts. But the variable condition is not true when the conversation starts.
Try changing it to On Conversation End. This will try to work when the conversation ends, at which point the variable will be true.
If you want to turn on the light immediately, you can instead use the SetEnabled sequencer command:
Thank you for sending the example project. I'm back in the office and responding to posts as quickly as I can.
In your example, the second Dialogue System Trigger is set to On Conversation Start. This means it will try to work as soon as the conversation starts. But the variable condition is not true when the conversation starts.
Try changing it to On Conversation End. This will try to work when the conversation ends, at which point the variable will be true.
If you want to turn on the light immediately, you can instead use the SetEnabled sequencer command:
Re: A condition for a Variable
Thank you, that was the last thing i needed to figure out.
In case you think it can be useful for someone else in the future, i finished the example with the 2 posibilities done.
In case you think it can be useful for someone else in the future, i finished the example with the 2 posibilities done.
Last edited by Feed on Sat Aug 03, 2019 12:39 pm, edited 1 time in total.
Re: A condition for a Variable
Hi,
Thanks for sharing! I removed the link since it contains the full Dialogue System package. But please feel free to export just your example files (without including Plugins/Pixel Crushers) and post it here to share with others if you like.
Thanks for sharing! I removed the link since it contains the full Dialogue System package. But please feel free to export just your example files (without including Plugins/Pixel Crushers) and post it here to share with others if you like.