You can use the same compare statement in a filtered array, and set global variable A equal to that filtered array. Now, if the filtered array simply produces one value, then global variable A will equal just that one value. If there are multiple values, then A will equal the resulting filtered array (but A itself will not be a filtered array after the assignment).
Also, “filtered array()” gives you all areas the player is inside, while “first of(sorted array())” gives you only the closest of the areas to the player. Depends on what you need.
This may works, but you need to have to known that when condition is evulated you can have different values in action, since workshop evulate conditions, after evulate actions.
it is possible to have condition true with different range size.
here i have allways radius 8
B[0] = 1;2;3
B[1] = 4;5;6
Is True For Any(Global Variable(B), Compare(Distance Between(Position Of(Event Player), Current Array Element), <=, 8)) == True;
C[0] = 8
C[1] = 4
Is True For Any(Global Variable(B), Compare(Distance Between(Position Of(Event Player), Current Array Element), <=, Index Of Array Value(Global Variable( C), Current Array Element))) == True;
Change it to: Is True For Any(Global Variable(B), Compare(Distance Between(Position Of(Event Player), Current Array Element), <=, value in array(global variable(C), Index Of Array Value(Global Variable(B), Current Array Element)))) == True;
Then it should work fine.