Sorry, I forgot the whole question after I started coding. I updated the code with everything you want.
So I start by setting a timer on event begin play, in the picture its between 0 and 30 seconds.
Then I line trace because the player could be standing with their back to a wall and you might not want the enemy to spawn behind the wall. In my case the enemy will spawn right behind the player if their back is right against a wall.
A line trace is a function that sweeps/moves from one position to another in one frame and if a X thing is in between those two positions it will get information about X thing. In my case I only get the hit location. More info here: WTF Is? Line Trace For Objects in Unreal Engine 4 ( UE4 - YouTube
Ok so spawn the enemy after we know whether the players back is too close to a wall, make sure the enemy is facing the player with Find look at rotation and start the timer all over again at a new random time.