Multiple actors with NPC AI are sharing BB keys value

Hello there,
I’m having some troubles with the ChooseNextWaypoint task, after the migration of PatrolRoute component to C++
Basically I have 2 pawns with the same NPC AI, in the example “Steve” with 5 patrol points, “Harry” with 3 (different ones), and they are somehow (at least they seem to be) sharing the keys value in the BlackBoard. As a result this is what’s happening:

  • Harry goes to point 0
  • Steve goes to point 1
  • Steve goes to point 2 (has near patrol point)
  • Harry tries to go to point 3 (so the forth), but he only has 3 defined points, so through code I’m resetting the Index to 0
  • Steve goes to point 0
    […]

Unless I’m missing something, they should handle their own Index key

Here there is my method (different naming, but it should be pretty much the same as what Ben did) with some logs at the end

Thank you very much for your help

Have you checked that you don’t have this box checked?

Wow, you’re right!
I think I’ve misclicked that checkbox…
Thank you very much Sam, you’ve really made my day!

Privacy & Terms