I've been playing with setting up mine fields around settlements but they just vanish when I leave the area.
There also pretty useless when you have a companion who insists on running over every single one you plant to clear a nice path for the enemy.
Is there anyway to program them like traps to only go off on hostile?