Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.



    https://imgur.com/a/Whapuqg

    #2
    Figured it out elsewhere. Use LastIndex instead of Length.

    Comment

    Working...
    X