var start[2];
var end[2];
function drawline_sample_startup()
{
mouse_mode = 4;
int draw = 0;
while (1)
{
draw_line (start,vector(0,0,255),100);
draw_line (end,vector(0,0,255),100);
if (mouse_left == 1)
{
start[0] = mouse_pos.x;
start[1] = mouse_pos.y;
draw=1;
}
if (draw == 1)
{
end[0] = mouse_pos.x;
end[1] = mouse_pos.y;
if (mouse_right == 1)
{
draw=0;
}
}
wait (1);
}
}