Can I get an STD by being coughed on by a infected person?

No. Sexually transmitted diseases are transmitted by sexual activity. You would not get these diseases by being coughed on by an infected person.
No. No, there are no stds that are spread by coughing. Only through contact with infected skin or infected body fluids.