What your friend was speaking of is the basic rules of harmonization, which state that the melody line and the bass line should share like notes. When they share notes they harmonize, i.e. the melody line and the bass line sound good together.
Big picture; If you have the chords listed you can assume someone has already harmonized the melody and the chords, all you have to do for your bass line to stay in harmony is play notes found in the named chord. Those chord notes already harmonize with the melody line.
Now the question is when and how many notes do you use in your bass line. One or two shared notes within the measure will do it. One is really enough. That's why just roots work.
So ---- The other posts touched on this already. Every basic chord will have a root, a 5 and an 8 (the root in another octave) so if you build a bass line using the Root, 5 or 8 you could take that bass line combination to any chord in the song. King's X - a diminished chord will have a b5, but, how many of those do you run into?
Some generic candidates are:
R-R-R-R
8-8-8-8 this is what your friend had you doing.
R-R-5-5
R-5-R-5
R-5-8-5
R-R-8-8. etc.
The other notes are gravy. Roots, 5's and 8's are the meat.
The 6 is neutral use it anytime you like. (R-5-6-8)
The 2 and 4 make good passing notes, just do not stop on them or linger on them. (R-2-5-8)
The 3's are not generic and are specific so -- 3 with major chords and b3 with minor chords. (R-3-5-3 or R-b3-5-b3). R-3-5-3 is generic under all major chords and the R-b3-5-b3 would be generic under all minor chords.
The 7's are not generic and are specific so -- 7 with maj7 chords, b7 with dominant sevenths and minor seventh chords. (R-3-5-7 or R-b3-5-b7)
I never go beyond the 7th. I suggest you get comfortable with the above before taking on the 9's, 11's and 13's.
Here is a video that will let you see the harmonization process. It will talk about the steps necessary in harmonizing the melody of "Mary Had A Little Lamb" and which chords can/could be used, i.e. that thing you assume someone has done for you. Once you have the chords you just stay in harmony by playing notes of the chord.
http://www.youtube.com/watch?v=vrDh0OFDCAk Yes, that's why we are told to play chord tones.
Have fun.