Q:

Plotting of for loop values (array)

As I'm completely new to Mathematica I'm stuck at the following problem:
I'm supposed to "fly" a drone in y-direction (upwards) and before it hits an "obstacle" which is placed at {0,5}, it should move out of the way in x-direction. This works out, however now I'm supposed to plot the "flightpath" of the drone. I tried this with an array but I was not able to plot it. Could someone help me out?
Reap[For[it = 1, it < 11, it++, drone = {0, it}; 
  Sow[drone] If[obstacle == drone + {0, 1}, 
    For[i = 1, i < 11, i++, drone = {i, it}; Sow[drone]]]]]
`{Null, {{{0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 
4}, {5, 4}, {6, 4}, {7, 4}, {8, 4}, {9, 4}, {10, 4}, {0, 5}, {0, 
6}, {0, 7}, {0, 8}, {0, 9}, {0, 10}}}}`

I know that "For" isn't the best way to do this in Mathematica but I'm used to it from other program languages.
I googled a lot of different approaches for this, (tables, lists etc.) but none worked out and this is the closest I got to a solution that works out for me (if I'm just able to plot it). 
Edit:
Thanks for your solution. Got it to work!

A:

You should have a semicolon between Sow[drone] and If[obstacle == drone + {0, 1} although in this instance it still works.  Here are some plotting suggestions.
obstacles = {{0, 5}, {3, 12}};
i = 0;

path = Reap[For[it = 1, it < 21, it++,
     drone = {i, it};
     Sow[drone];
     If[MemberQ[obstacles, drone + {0, 1}],
      Do[drone = {i++, it};
       Sow[drone], 3]]]][[2, 1]];

plot = Show[ListLinePlot[path, PlotMarkers -> Automatic], 
  ListPlot[obstacles, PlotStyle -> Red, PlotMarkers -> {Automatic, 12}],
  Frame -> True, PlotRangePadding -> {0.6, {1, 2}}, Axes -> False]

