ForEachLoop ignores the last element
Hi! Looks like the foreachloop iterates not over all elements in array. I've made 3 target points and made an array of vectors out of them. The loop iterates over 2 vectors and the third one is ignored. Why does it happens? Thanks for any suggestions. My level blueprint looks like that:
asked May 21 '15 at 03:14 PM in Blueprint Scripting
The issue you're encountering is actually the way ForEachLoop is suppose to work. The problem is that it is attempting to move to all 3 locations at the same time. It is passing all 3 values through, instead of doing it one at a time. I put together a way that you could loop this movement, but it involves adding trigger volumes where the markers are.
Hope this helps!
answered May 22 '15 at 06:50 PM
I recreated this, sort of, in a new project but it is going through each one. Could you set up some print strings to see if it is actually iterating on the last vector or not? This is how mine looks and it outputs in order after every second.
If simple print strings work, then the issue may be somewhere else in the blueprints.
answered May 21 '15 at 07:41 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here