—
If it doesn't bother you if the enemies are placed in random outside your viewport you have only to look which area you cannot see. The area you can see is called viewport. The area you cannot see is between the borders of the layout and the viewport. So you need the coordinates of the viewport and the size of the Layout. Luckiey Constrcut2 provides this. There are ViewportLeft, ViewportTop, ViewportRight, ViewportBottom, LayoutHeight, LayoutWidth.
Now you have to calculate the area which you cannot see. You need a x and y position:
0<x< viewportLeft or viewportRight<x<LayoutWidth
0<y<vieportTop or viewportBottom<x<LayoutHeight.
Now you have the coordinates to spawn an enemy which is not created in the viewport. I made a litte example maybe it's easier to understand.
https://drive.google.com/file/d/0B5FlDY ... sp=sharing