I have a bunch of sprites, and I'm trying to pick two objects based on the value of one of their variables. The value of the variable, let's call it ID, is different for each sprite. I want to make a condition that will pick two of the sprites, such that if their ID=Value1 OR ID=Value2 they're picked but no other values are picked. It seems like OR does something close to this (e.g. Pick by comparison1 OR Pick by comparison2) however, it doesn't seem to clear previously picked objects the first time.
What I mean is this:
I have 2 objects, Object1 and Object2 with two private variables, Var1 and Var2.
I have 10 Sprites with the private variable ID.
I have the following code:
[code:10btf93t]On mouse over Object ---> Call Function Function1 and Remember
On Function 1
Pick Sprite by Comparison, Sprite.Value('ID')=Object.Value(Var1)
Pick Sprite by Comparison, Sprite.Value('ID')=Object.Value(Var2)
For Each Sprite ---> DebugText set Text Sprite.Value('ID')[/code:10btf93t]
When I put the mouse over Object1, this works fine and I get the ID of both of the sprites that match
Then, If I put the mouse over Object2, the first time, on top of getting the ID of the two correct sprites, I also get the ID of the sprites that match Object1's variables. The second time I put the mouse over Object2 I get only the correct two sprites. This also works in reverse (e.g. if i start with Object2 and then mouseover Object1).
What's going on? I can post the cap but literally the only code involved in the function is exactly what I posted above.