I see your line function, and I raise you my line function
Note that you'll need Advanced 2D DLL to run my function.
Pos_X & Pos_Y are the starting point, then simply state your length and in what angle you'd like to draw. Centre is a toggle, that when active, Pos_X & Pos_Y will be the centre of the line. Pretty cool eh?
Function Draw_Line_Direction(Pos_X, Pos_Y, Length, Angle,Centre, Colour)
If Centre = 0
A2line Pos_X, Pos_Y, Pos_X + (length*Sin(angle)), Pos_Y+(length*Cos(Angle))*-1 , Colour
else
A2line Pos_X, Pos_Y, Pos_X + ((length*0.5)*Sin(angle))*-1, Pos_Y+((length*0.5)*Cos(Angle)), Colour
A2line Pos_X, Pos_Y, Pos_X + ((length*0.5)*Sin(angle)), Pos_Y+((length*0.5)*Cos(Angle))*-1, Colour
Endif
Endfunction