How do I swap two variable's values?
Let say I have two variables A and B.
How do I swap their values in the safest way?
I can link a Variable Getter (A) to a Variable Setter (B)
and B to A.
How am I sure I won't end up with twice the value of A or the Value of B depending on the order of execution?
-
I have similar issue. I want to switch values of two counter. Tricky stuff :-D
-
Hi, yeah that's a tricky one with this type of logic. You may need to have two temporary variables that you assign to 1 frame and then the next frame assign back into the other variable.
I'll have a think if there's a better workaround...
thanks
Matt -
You could try to freeze the values with a signal manipulator as soon as the swap happens
-
What if you add a second set of variables identicle to the first two? Then you could trade between without risk of changing the initial values.
I'm not sure I'm explaining that right.
Please sign in to leave a comment.