Noticed something weird with loop index

Hey there, I noticed something really strange today with loop index or maybe I’m don’t really follow how loops and their index work. But anyway, in the first image, I set my loop index from 0 - 1 to create 2 players and i am setting the return value to a playercontroller array and later with 2 gets, I set my playercontroller1 and playercontroller2. (This is for local multiplayer game). The “Get” with index 0 doesn’t return anything, whereas the “Get” with index 1, returns one of the 2 playercontroller spawned.

In the 2nd image, I changed my loop index to 1-2 and its returns value for both “Get”. Is there a reason why it doesn’t return anything on my “Get” with index 0, when I have my loop index set from 0-1?

It really depends on the array that you are looping on and at what indexes the controllers were assigned. It should start at zero, not 1 or that would be really confusing.

In my case when I start my loop index from 0, it returns “none”, sadly.

Yes, but that has everything to do with the array you are looping. It is valid for something to be set to none.

I figured it out. The first player controller is spawned by default, which is assigned the id 0. The ‘Create Player’ node fails to return a valid player controller for loop index 0.