So I am trying to get an enemy to move towards a set object once they spawn in. however they will not move towards this object and attempt to destroy it for right now I’m calling it the core. however they don’t spawn in knowing where this object is and often spawn outside of normal pawn sensing range or out of sight of the core. this core will be in every map in a different spot on each map but there will always be just one of them. I’ve tried the ways that usually work to get them to chase the player character. I know I will likely have to set a object reference variable but I’m unsure how to do that when they wont spawn that close or out of sight of the core.
EXAMPLES: casting to the core (Always fails), getting the actor of class and converting to object location(Always fails to find the object or says there isn’t one), Setting a Giant collision mesh that covered the whole map(crashed unreal every time it went above 5 Enemies)
The way I planed the enemy to work is that they’ll move towards the core and upon seeing the player they’ll switch to attacking them and if they don’t see the player they’ll move to the core and destroy it. For right now I’m just trying to get them to go to the core as I already have an enemy that’ll move towards the player no matter what.