I am regular user of StackOverflow, but new here.
I'm trying to guess how to do that:
Given a straight line (x1, y1, x2, y2) how can i get the point into the line (x, y) who are at an n distance from x1, y1?

I'm very bad with math, and I'm developing a 2D game. That should be forbidden!!
Thank you very much!!
Let us try from an algebraic point of view. Your three points are along a straight line defined by two points $(x_1,y_1)$ and $(x_2,y_2)$. So, let write the equation as $y = a +b x$ and create the two equations in order to find $a$ and $b$. So, we have $$ y_1=a+b x_1$$ $$ y_2=a+b x_2$$ from there $$a=\frac {x_1 y_2-x_2 y_1}{x_1-x_2}$$ $$b=\frac {y_1-y_2}{x_1-x_2}$$ Now the new point $(x,y)$ is along the line which means that $$y=a+b x$$ and the squared distance from point $(x_1,y_1)$ is given by $$(x-x_1)^2+(y-y_1)^2=n^2$$ In this last expression, everything is know beside $x$ which can be extracted and since you need $x \gt x_1$, the solution is then given by $$x=x_1+\frac{n^2 ({x_1}-{x_2})^2}{\sqrt{n^2 ({x_1}-{x_2})^2 \left(({x_1}-{x_2})^2+({y_1}-{y_2})^2\right)}}=x_1+\frac{n ({x_2}-{x_1})}{\sqrt{ \left(({x_1}-{x_2})^2+({y_1}-{y_2})^2\right)}}$$ and $$y=\frac {x_1 y_2-x_2 y_1}{x_1-x_2}+\frac {y_1-y_2}{x_1-x_2} x$$