Yes that is one of the purposes that these stories and legends serve. Their characters are archetypes that leave an indelible mark upon the human mind and inspire us towards greatness.
The Ramayana and the Mahabharata are the best of all since they not only place before us ideal characters but show us the path to be followed in real time.
Affectionately,
Alok da.