What about something like
:state=0,plrdistwithin=300,usingweapon=1(or whatever weapon slot the flashlight is),mouseclick=1:state=1
:state=0,plrdistwithin=300,shotbyweap=(directory for unarmed) 1:state=1
That would only work in Fenix Mod, but if you:
Use flashlight, it'll see you and attack.
Hit it with unarmed (and only if you hit it) it'll attack you.
If you use a gun, it'll still have bullet holes.
However, if it is shot, it'll do nothing.
Hope that helps a little.
"And we played the first thing that came to our heads...Just so happened to be... the best song in the world...
it was the best song in the world..."