AI moving to 0,0,0 instead of assigned location

So i’ve set up a little scene with some AI characters. When it begins every actor with the name “BP_Collect” and “BP_Deposit” get put into an array. Then when my character wants to move, i use a function to get a random value from the array, and another function to move them to that location.

Now i know this works, half of the AI travel to where they are supposed to be, however the other half do not, they travel to 0,0,0. I thought it might be something to do with timing. so i added a delay but got nowhere with that. Theirs no pattern on which AI does it, sometimes its none of them, sometimes the majority. Their is nothing else getting put into the array to mark it as 0.0,0 either.

Figured it out elsewhere. Use LastIndex instead of Length.

Can you explain how you solved this ?

I am trying to get my dog to fetch a simple pick up cube, or pick up actor I have made…

Ai move to works when my pointer tells the dog where to go, but for some reason, when I try to get world location of the pick up actor, and move my dog to that location, it always goes to 0,0,0.

and I have a print string showing me that my cube is in fact, not at 0,0,0.

but for some reason I can’t seem to get any location other than 0,0,0 into my location node.

In my ai companion character BP, I have the custom event… with a location node as a vector

and in my pawn character I call that function on my ai companion and attach my pick up object, getworldlocation to it…

but it always goes to 0,0,0 ?

I hit my input letter “L” and it sends my ai companion to 0,0,0 and prints that value as a string ?

why ?
the actor is clearly at a true location via its own print string location node