I created two different methods to print some integers, and from my concept, I thought they would print out the same result, but they ain’t.
In method 1, there are 2 arrays to compare,
RefTable: 1,2,3
Obj: 1,2,3,1,1,5,0,2
The print out result is: 1,1,1 then after 5 seconds 2,2 are printed out, and after 5 seconds 3 is printed out which is correct.
However, in method 2, the same result cannot be obtained.
In method 2, I used RefTable and Obj array like the above method.
If the comparison is true, the value will be added to an array and then print out. I suppose the result would be the same as above. However, what I got is 1,1,1,1,1,1, then after 5 seconds 2,2,2 then after 5 seconds 3 is printed out.
How to make method 2 obtain the same result as method 1? Thanks!
Dificult to reply in blueprints since it’s not my thing. But in C++ if you count with the loop variable on a value you will get 1,2,3,4,5 the loop var counting and imprinting it;s self on the position you put it , either a function call parameter, a vector and so on. If you do not put the loop variable inside the loop body on any position it will count 1111111111, each time it will repeat the count but it will not imprint the count on the input you are trying to give, it will just refresh the values inside the element you have that has other variables so the value of the variables change. So looks like maybe you have a hibrid of counting on the loop variable inside something combined with other elements that also refresh and count the next values inside of them but without counting with the loop var.
Thank you for your reply. For both methods, I also used for each loop with delay. Method 1 achieved what I want. So, I think the for each loop with delay is not the issue?