I am familiar with the octet rule, but what is confusing me is sometimes, especially in linear bonds, there is 2 single bonds with 2 lone pairs around the central atom. And other times a different linear molecule is drawn with two double bonds to satisfy octet instead of the two lone pairs around the central atom.
So what really dictates if the central atom will form two double bonds or will just have two single bonds and 2 lone pairs?