I have an enemy that spawns a box in front of itself and walks around it.
The box is invisible to the player, and deletes itself after some time.
But how do I make sure that only that one specific box, blocks the instance that spawned it?
What I’m after is to make the enemy movement more interesting, so it doesn’t just go straight after the player.
You will need to script the desired behaviour. Simple behaviours can be scripted into an actor or a component, for more complex stuff look into Behaviour Trees.
Here’s a couple of examples demonstrating how basic logic could be set up, they’re pretty crude but hopefully you can make them better: