You write it however it makes sense. Much of the time, you will be writing it as a screenplay, since the scripts are usually event-trigger based. Read a book on how screenplays work, scene setting and dialog.
If your story is very linear, this will be pretty much all you need. If there is a divergent pathway or dialog trees, things get a little more complicated and you have entered the realm of the game designer. By one of the more liberal-artsy books on game writing and read it, you can learn a lot.
Also, it''s a good idea to make detailed, polished character sketches (see the ones in FF7''s booklet that comes with the game (or they''re online somewhere)). For a very fluid story notecards, flowcharts, and/or storyboarding may come in handy.