I have a problem with comparing values inside of an array.
Global A consisft of vectors with identical Y component (the first two actions).
The thing I want to do is to remove each vector from this array if its distance between any value inside of Global A is less than 40, however, [for… to…] action doesn’t seem to work. It somehow skips a lot of vectors which don’t fit the distance condition. Here’s the code:
variables
{
global:
19: Temp
}
actions
{
Global.A = Mapped Array(Spawn Points(All Teams), Position Of(Current Array Element));
For Global Variable(Temp, 0, Count Of(Global.A), 1);
If(Is True For Any(Global.A, Distance Between(Current Array Element, Global.A[Global.Temp]) < 40) == True);
Modify Global Variable(A, Remove From Array By Index, Global.Temp);
End;
End;
}