'No one was going to cast me in the lead, I had to write it'