Page 1 of 1

Suggestion: PlayMaker Set Variable "wait to confirm" option

Posted: Sun Nov 21, 2021 1:35 pm
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!

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

Posted: Sun Nov 21, 2021 2:26 pm
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?

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

Posted: Sun Nov 21, 2021 5:38 pm
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:

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

Posted: Sun Nov 21, 2021 7:49 pm
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.