The purpose of life is not to be happy. It is to be useful, to be honorable, to be compassionate, to have it make some difference that you have lived and lived well.
People who learn to control inner experience will be able to determine the quality of their lives, which is as close as any of us can come to being happy.