I have a project where it has 1 NPC and 3 target points:

In the project I set the NPC to go to target point 1, then to 2, then to 3.
Expected path:

Path that is occurring:

This problem did not happen out of nowhere, but first I will explain the creation of the target points.
I created the first target point, added the components it needed, and then replicated it. Selecting the first target point and pressing CONTROL + W. I positioned the second target point, and then, again selecting the first target point, I again replicated it.
The order of the path was as expected. I modified some code (none of the codes I modified related to the NPC or target points). After that I created a new target point (replicating it from the first target point) and then my problem started.
The NPC was initially going to target point 3, to the 4, 1 and then 2.
Even excluding target point 4, the order did not return to the expected (1, 2 and 3).
I inserted a print after the loop that causes the NPC to move toward the target points, so I could figure out the order of the target points, and it is making sense with the order of the path that is taking place.
Blueprint + Print:

3 to 1 to 2.
I created 2 more target points, and see how the order changes without any sense:

4 to 5 to 1 to 2 to 3.
I added another 1 target point to see if it meets a pattern:

No sense at all.
I'd like to know how to set the order of target points in the array.
Sorry for bad English, I'm not a language speaker.
I asked that same question on another site a few days ago (https://gamedev.stackexchange.com/qu...t-the-order-of), I researched order in an array and ways to set it, but I did not succeed.
In the project I set the NPC to go to target point 1, then to 2, then to 3.
Expected path:
Path that is occurring:
This problem did not happen out of nowhere, but first I will explain the creation of the target points.
I created the first target point, added the components it needed, and then replicated it. Selecting the first target point and pressing CONTROL + W. I positioned the second target point, and then, again selecting the first target point, I again replicated it.
The order of the path was as expected. I modified some code (none of the codes I modified related to the NPC or target points). After that I created a new target point (replicating it from the first target point) and then my problem started.
The NPC was initially going to target point 3, to the 4, 1 and then 2.
Even excluding target point 4, the order did not return to the expected (1, 2 and 3).
I inserted a print after the loop that causes the NPC to move toward the target points, so I could figure out the order of the target points, and it is making sense with the order of the path that is taking place.
Blueprint + Print:
3 to 1 to 2.
I created 2 more target points, and see how the order changes without any sense:
4 to 5 to 1 to 2 to 3.
I added another 1 target point to see if it meets a pattern:
No sense at all.
I'd like to know how to set the order of target points in the array.
Sorry for bad English, I'm not a language speaker.
I asked that same question on another site a few days ago (https://gamedev.stackexchange.com/qu...t-the-order-of), I researched order in an array and ways to set it, but I did not succeed.
Comment