Sorry if this question is confusing, I'm very confused as well.
Here's the capx, it's probably better at explaining itself than I will be:
https://www.dropbox.com/s/6xjmj13x95048 ... .capx?dl=0
At the start of the layout, I make a red square spawn a blue square, and have Red store Blue's UID, while Blue also store's Red's UID.
I have two functions. They both do exactly the same thing: they accept the UID of a red square as Param(0) and pick the blue square it spawned. The only difference is in how they pick the blue square: either
- by using Blue's Pick by UID action and using the value stored in Red, or
- by using Pick By Compare and comparing Blue's stored Red UID value to Red's actual UID.
The latter method doesn't work. But it only doesn't work if I do as I said above and have Red spawn Blue and store values at that point. If I actually just have Blue on the layout, don't spawn anything, and still have them store each other's values on Start of Layout, the latter method works perfectly fine. It also works if I call the latter function by clicking on Red.
The only conceivable reason I can think of is that on the start of layout, the Pick By Compare function runs before Blue has a chance to store Red's UID, and thus when the function tries to Pick By Compare, Blue's stored value is still 0. Is this actually the case?