If they're near a npc they should detonate automatically hostile or not.
Just place them at choke points stand back and shoot someone then hide where there is no direct LOS to you.
The npc's will rush you and set the mines off, without you having to get near.