Line shape of resonance cars as an indicator for the scattering of molecules in ground or excited states