I would do it like this: (should be the same as sivan's suggestion)
Code:
VECTOR* trace_vec;
vec_set(trace_vec, [vec from trace start to trace hit]);
var dist = vec_length(trace_vec);
vec_normalize(trace_vec, dist - 50); // keep 50 quants distance to hit position
vec_add(trace_vec, [trace start position]);
after this 'trace_vec' is the spawn position of your entity, 50 quants away from the hit position (at least in theory).