Until someone (not me) who is comfortable with the nearestobject command replies, here is a workaround:
make a trigger with a radius of 1 meter. Set it to go off repeatedly and set the parameters for East/West (depending on who the enemy is) and "Present". Name the trigger "stab".
In the "on activation" field, place the following line:
"_x setdammage 1" foreach thislist"
(not 100% sure on syntax, but it should work)
Open or create a init.sqs file and add the following:
player addaction ["Stealth Kill", {[] exec "stab.sqs"}]
stab setpos [0,0,0]
Create a stab.sqs script file and put in the following code:
stab setpos getpos player
~1
stab setpos [0,0,0]
exit
I'll test it out today after work, and I'll try the nearestobject command too...
-Grendel