If I understand your question correctly, using your scale intervals can be very important in writing a good melody. Sounds like you may already know a few common intervals, but i'll include all within a major scale below.
C Major Scale: C D E F G A B
Major Scale Intervals: root, major 2nd, major 3rd, perfect 4th, perfect 5th, major 6th, major 7th
If you were to lower any of the major intervals (2 3 6 and 7) one half step, this would cause the interval to be minor. An A minor scale has three minor intervals.
A Minor Scale: A B C D E F G
Minor Scale intervals: root, major 2nd, minor 3rd, perfect 4th, perfect 5th, minor 6th, minor 7th
Mixing major and minor intervals within a melody can be useful and interesting sounding, just make sure to experiment and listen back to see what you enjoy! Hope that helps!