Ashley
Please consider this capx.
The idea is that each NPC instance has a Target instance variable that allows to match with a destination Waypoint thanks to a "Compare instance variable value" condition.
Each Waypoint has an ID instance variable that is used for the picking/determining the target of the NPC and is the instance variable compared in the condition.
A single condition event is used.
We know that C2 will implicitly loop through all the instances of the "main" object type referenced (in our code: "Waypoint") as if there was a "For each Waypoint" (implicit).
We also know that to actually achieve what we are willing to do, having the condition "For each NPC" (explicit) will loop through all the instances of the NPC (and has to be placed before the comparison in order to work, otherwise the looping would happen only to the picked instances after the comparison).
This condition is disabled for now though, in order to try it with a single event and determine a theory on how the picking is working and how the "second reference" object (NPC) is being picked.
As the capx is set by default, our goal is still reached, each NPC is going toward the Waypoint it is supposed to (each NPC instance is reaching for a unique Waypoint instance).
We could then assume that under the hood, C2 is still looping through the NPC instances to find a match for the condition.
Now take NPC instance NPC 1 (currently of Target value 1), and modify its Target value to 2.
Expected NPC 0 going to WP0; both NPC 1 and NPC 2 instances to go towards Waypoint WP 2; NP 3 going toward WP 3; NP 4 going toward WP 4.
Happening : The NPC 1 goes towards Waypoint WP2 instance, NPC 2 instance goes towards Waypoint WP3 instance, NPC 3 goes towards WP4; NPC 4 goes towards WP0 (ID = 0)
Theory : When a "second reference" (our NPC object type) instance is a match, the looping stops.
For the reminding instances though, it seems the destination Waypoint is Destination + 1 (with the last instance going back to the "default"/first waypoint instance).
(Might have to see with the IID stack)
---
Now modify the NPC1 instance so that its Target is 0.
"General expectation", would be both NPC0 and NPC1 going to the WP 0, NPC 2 going to the WP2, NPC3 going to WP3, NPC4 going to NPC4.
Although, according to our previous theory, we could expect NPC0 going to WP0, NPC 1 going to WP1 (destination + 1), NPC 2 going to WP3, NPC3 going to WP4; NPC4 going to WP 0. (Theory expectation)
Happening : Same result as previously.
So a difference with our "Expected theory" is that NPC1 is not going to destination + 1.
---
Let's try something else.
NPC0 to Target0, NPC1 Target to 0, NPC2 target to 2, NPC 3 target to 4 and NPC4 Target to 4.
We have two pairs of instances set to go to the same waypoint.
"General expectation" would be NPC0 to WP0, NPC1 to WP0, NPC2 to WP2, NPC3 to WP4, NPC4 to WP4.
"Theory expectation" would be NPC0 to WP0, NPC1 to WP1, NPC2 to WP3, NPC3 to WP4, NPC4 to WP0.
Happening : NPC0 to WPO; NPC3 to WP0; NPC1 to WP2; NPC4 to WP2; NPC2 to WP4.
From there I must admit I have no more theory to what's going on and how NPC instances destination's Waypoint instance is being picked in that case.
---
Let's try even further
Reset each NPC to have a single destination, in order as it was originally.
NPC0 Target 0; NPC1 Target 1; NPC2 Target 2; NPC3 Target 3; NPC4 Target 4.
Now let's change WP2's ID from 2 to 6.
"General Expectation" : NPC 0 to WP0; NPC1 to WP1; NPC 2 to not move; NPC3 to WP3; NPC 4 to WP4
"Theory Expectation" : NPC0 to WP0; NPC1 to WP1; NPC2 could go to WP 3; NPC3 to WP4; NPC4 to WP0
Happening : The Theory expectation is happening. So our first observation/guess was not that bad.
---
Modify NPC 1 Target to 6
"General expectation" : NPC0 to WP0; NPC1 to WP2; NPC2 to not move; NPC3 to WP3; NPC4 to WP4
"Theory expectation" : NPC0 to WP0; NPC1 to WP2; NPC2 could go to WP 3; NPC3 to WP4; NPC4 to WP0
Happening : NPC0 to WP0; NCPC3 to WP0; NPC1 to WP3; NPC 4 to WP3; NPC2 to WP4
I don't know what's happening.
In all those permutations though, if you enable the "For each NPC" condition, the "General expectation" scenario is happening, as expected, and as we know it should/has been the solution for these kind of picking for years.
Nonetheless, what is the actual picking scenario that is going on inside C2 when only a single condition is applied and that would explain all those observations ?
My original assumption was that only the first instance of the object type was picked.
Nonetheless, on trial, it seems it wasn't the case in a specific set of use.
And through those observations, I must admit I don't have a working theory that would allow for a valid expectation when only using the single condition in whatever setup.