I think it works on vectors. So if your entity is stood at 0,0 and is hit by a player at 50,50 then you would give it -50,-50, because that is the direction the bullet was traveling in when it hit the enemy...
Here's my code:
`tell enemy where it was hit from
move object x,1:nx#=object position x(x):nz#=object position z(x):move object x,-1 `x is the bullet which I move to get its trajectory then move back to where it was to get its origin
AI Set Entity Hit hit, nx#-object position x(x),nz#-object position z(x) `so nx#(new pos in x) minus origin in x gives me the vector in x (etc.)