Suggestion: PlayMaker Set Variable "wait to confirm" option

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

Suggestion: PlayMaker Set Variable "wait to confirm" option

Post by Abelius »

Hi there Tony,

Using PlayMaker I've observed that the Set Variable action takes a while until the new variable value is actually written in the DS database.

Certainly more than one frame, so that could end up in designing faulty logic if you're not careful to wait the necessary time to check on the variable again.

I'm dealing with that problem with my own FSM template that I run instead of the raw action. It makes sure the variable value is set before continuing. All good.

But I was thinking that maybe it would be a good idea to implement a "Wait until written" option in the action itself? It would make the whole thing a bit cleaner, I guess.

Just my two cents. Thanks!
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Suggestion: PlayMaker Set Variable "wait to confirm" option

Post by Tony Li »

Hmm, the Set Variable action sets the variable as soon as the action starts.

Is it possible that there's a configuration error somewhere else in your FSM? Maybe the Set Variable action isn't running when you think it should, or maybe you're checking a cached value instead of reading the new variable value?
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Re: Suggestion: PlayMaker Set Variable "wait to confirm" option

Post by Abelius »

You're right. I've made a test FSM with a Set Variable action followed by a Get Variable on the same text variable, and it returned the set value, not the initial one.

Defective logic on my part then. I wonder where...

Sorry for the forum contamination. :roll:
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Suggestion: PlayMaker Set Variable "wait to confirm" option

Post by Tony Li »

No worries! It doesn't hurt to check here first in case something really is a bug or quirk in the Dialogue System. Could save a lot of time trying to track down something that's not in your own code.
Post Reply