SetVariable(variable, <another_variable>) sequencer command... possible?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

SetVariable(variable, <another_variable>) sequencer command... possible?

Post by Abelius »

Hi there, long time no see.

I'm curious (and this may be quite basic) if it is possible to set a variable's value to another variable's value, with a sequencer command?

More specifically, a string variable...

I've tried

Code: Select all

SetVariable(variable, speaker);
...but it just assigns the word speaker, instead of the Actor's name. :|

I've also written...:

Code: Select all

SetVariable(variable, var=speaker);
...which gives the var=speaker value, and...:

Code: Select all

SetVariable(variable, [var=speaker]);
...which gives a nil value.

So, am I missing something?

Btw, I'm calling these commands from a sequencer shortcut.

Thanks.
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetVariable(variable, <another_variable>) sequencer command... possible?

Post by Tony Li »

Hi,

You can't use 'speaker', but you can use the variables 'Actor' and 'Conversant' like this:

Code: Select all

SetVariable(variable, [var=Actor])
Post Reply