Once rehearsals are done the writer really doesn't have a function on the set. If the script is stabilized, then the writer becomes a celebrity tourist visiting the set, trying not to get in the way. It's very good for the ego, to go visit a film set if you are the writer, because they give you a special chair, and tell you where you can sit to watch the monitor. They make you feel special, but at the same time, they make it perfectly plain that you are irrelevant!