ok here is what I think may be happening . First some lines from the alarmer script
local.range = 5000
....
...
local.temprange = vector_length (self.origin - $alarm[local.i].origin)
if ((local.temprange < local.range) && (vector_length ($player.origin - $alarm[local.i].origin) > local.temprange))
local.temprange is the distance from the ai to the alarm switch . so the first part says is the distance to the alarm less than 5000 .
&& = And . The next part says is the distance from the player to the alarm greater that the ai distance to alarm . If these things are true the script goes on to set a 12 second timer .
while ((isalive self) && (local.break == 0) && (level.time < local.timer))
The script then checks to see if the ai reaches the alarm within the 12 seconds if so he pulls the alarm . Farther down in the script it checks to see how far the player is from the ai and sets that as the local.range . So what does this mean , well if the distance to the alarm is less that the distance to the player and is the ai closer to the alarm than the player and the ai cansee the player he should be trying to ring the alarm . but if the distance to the player becomes less that the distance to the alarm the ai will attack the player instead .
I hope this helps good luck