For their script, have them manually target your dummy ally with the "settargetname" command. Give this command your dummy ally entity's name. Then you can have them rotate to that entity with "rotatetotarget". After that, since they are facing your dummy ally, you can have them just "useweapon".
Now when the player approaches, you can check for the player's distance from the entity with "plrdistwithin". Whent he player gets close enough have them run a regular AI sequence for enemies.
Hope you understood all that.
The one and only,
Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.