Set a trigger around the base big enough for the area that you would be spotted by the guards. If its an East guarded base then set the Activation box to West and just below it select the Detected by East button.
Go to the Effects menu and in the Trigger drop down list select Alarm.
If the East guards sees the West units, then the alarm will sound, however it will also sound alarm if the West unit shoots at the East guard.
I dont know how to make the alarm wait until an east guard sees a dead body.