Switch between two locations
For simplicity and avoiding the use of extra information:

You can check 'use self' which allows to get data from the object directly.

Using 'self' calculates the expression during the move, but keeps the current value (so that no circular dependencies) and finally apply the expression.

So for instance if the expression is:

(self.location[0] &lt;= 0.5) * 0 + (self.location[0] &gt; 0.5) * 1


you obtain:



Edit: of course in this case, the expression can be shorten to:

self.location[0] &gt; 0.5


Edit2: following the comment of @DuaneDibbley, for your information.

A Python boolean expression can be True or False and True is numerically equal to 1, False is numerically equal to 0.

So you can use them as numerical values.