Hello!
I am completely new here, and new to unreal engine, so sorry if I sound uninformed.
I want to create a chasing system, where X amount of NPCs chase the player character around. When the player manages to escape the chasers, other NPCs stop free-roaming and take place of the NPCs who were chasing the player.
I only want X amount of NPCs (which the user defines) to chase the player, not more than that. I want the rest of them to keep free-roaming, until the player evades them, like I mentioned previously.
To achieve this, I am thinking of having all the NPCs in 1 array. When the NPCs spot the player, remove it from the NPC array and add it to another Chaser array.
Then have a branch/less than condition which limits the number of NPCs chasing the player.
However, I have not been able to make this work. ALL the NPCs chase on the player on sight.
I am also getting an error on the Cast Node.
I am trying to use a “Director” blueprint which has both the chaser and NPC arrays. And I am trying to call functions from the director script using event dispatchers (RED ARROW IN SCREENSHOTS)
How do I get this working? Feel free to let me know if you need more screenshots. Thank you for your time to help me out! <3




