Hi, Tony.
I want to change the conversation title on a dialogue system trigger.
So, I have the string yet and I assign the dialogue trigger to a public Dialogue Trigger. But, when I try to do:
dialogue Trigger.conversation = "new conversation";
Isn't work.
How to set conversation to a dialogue trigger?
Re: How to set conversation to a dialogue trigger?
Hi,
Do you want to change what conversation a Dialogue System Trigger plays at runtime?
If so, then if you have a variable 'triggerObject' that points to the Dialogue System Trigger's GameObject you can do something like this:
Do you want to change what conversation a Dialogue System Trigger plays at runtime?
If so, then if you have a variable 'triggerObject' that points to the Dialogue System Trigger's GameObject you can do something like this:
Code: Select all
var dialogueSystemTrigger = triggerObject.GetComponent<DialogueSystemTrigger>();
dialogueSystemTrigger.conversation = "new conversation";
Re: How to set conversation to a dialogue trigger?
Thanks! So, finally. How could I change a variable Initial Value with a script?
Also, the type number of the variables support floats?
Thanks a lot for your help, Tony!
Also, the type number of the variables support floats?
Thanks a lot for your help, Tony!
Re: How to set conversation to a dialogue trigger?
Hi,
If you're talking about changing variable values at runtime, you don't change the initial value. You change the current value. To do this, use DialogueLua.SetVariable(). For example:
At runtime, treat the dialogue database like it's read-only. Changes are made through the Dialogue System's runtime Lua environment.
Under the hood, Number variables are doubles. But you can use them as doubles, floats, or ints.
If you're talking about changing variable values at runtime, you don't change the initial value. You change the current value. To do this, use DialogueLua.SetVariable(). For example:
Code: Select all
DialogueLua.SetVariable("Score", 42);
DialogueLua.SetVariable("Color", "blue");
Under the hood, Number variables are doubles. But you can use them as doubles, floats, or ints.