Okay, I got it to work and I did some revisions to make it look better.
Put these lines of code right after the ";Triggers" line in your enemy's Main AI as well as their Shoot AI:
:activated=2:activate=1,state=50
:state=50:setframe=11,state=51
:state=51:incframe=11
:state=51,frameatend=11:runfpidefault=2
Now, here is the entire script for your switch. (I'm assuming you're using a non-animating switch... the ones that just change their textures)
;Artificial Intelligence Script
;Header
desc = Kill Switch
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,plrusingaction=1:activateifused=2,alttexture=1,plrsound=$0,state=1
;End of Script
Now REMEMBER to put the name of your enemy into the switch's "IfUsed" property, otherwise this won't work!
Enjoy!
The one and only,
~PlystirE~