So I would have a method that positions them. Take the number of ships minus 1, times the number of pixels of separation, plus the width in pixels of the ship. That gives you the total width. Now start positioning them at the MouseX()-totalWidth from left to right.
totalWidth = ((shipCount-1)*sepWidth)+(shipCount*shipWidth)
for i=0 until shipCount
ships[i].x = MouseX()-(totalWidth/2)+(shipWidth/2)+(i*sepWidth)
next
something like that should do it for any number of ships 1 to n. The above assumes you are using midhandle for the ship images
totalWidth = ((shipCount-1)*sepWidth)+(shipCount*shipWidth)
for i=0 until shipCount
ships[i].x = MouseX()-(totalWidth/2)+(shipWidth/2)+(i*sepWidth)
next
something like that should do it for any number of ships 1 to n. The above assumes you are using midhandle for the ship images