Hi all,
I have set up an enemy spawner that spawns enemy cubes into the level. These are scripted to move about the map until they see the player, at which point they move to the player and surround them. This works well to an extent, though there are some instances when the cubes will be facing the wrong way and they don’t ‘see’ the player at all, even if they have been following them seconds before.
As it stands, I’m currently using a blueprint with PawnSensing attached to it. The PawnSensing component is only using “OnSeenPawn” event to ‘see’ the player and then move toward them.
My questions are:
- How can I make the enemy cubes sense when other enemy cubes are following the player? I’d like to ideally simulate a hoarde-style mechanic where if an enemy cube in the radius of another is following the player, that other will then join the hunt.
- Could there be any conflicts where the enemy cubes would only follow one another? If so, how can I avoid this so they only group when they see the player? (I’m guessing some kind of branch to determine if they do see the player and an enemy cube at the same time.
This is my blueprint so far:
Any help with this would be greatly appreciated