Code:


vec_set(temp,you.x);
vec_sub(temp, my.x);
vec_to_angle(myang, temp);
my.bewegen_pan = sign(ang(myang.pan - my.pan));




my.bewegen_pan = -1 if the you Entity is on the left side.
my.bewegen_pan = 1 if the you Entity is on the right side.

I don´t know if this is the best way, but at least its working...

Slin