WARNING: Spoilers present
Eric Berne developed a theory in the 1950's called Transactional Analysis (TA). This theory is based around the notin that when communicating, human beings actively "give something" to one another; in other words, a transaction takes place. It is a thoery widely used in teaching in the UK (possibly too widely and to its detriment in my view, but that's a debate for another time): give your students positivity, they will be positive learners; give them negativity, make them hate you and learning in general. The notion then is very simple at its heart.
But Eric Berne goes on to outline three "ego states": Parent, Adult, Child (PAC). These are not stages a human being passes through (whilst we have all been children and will all be adults, not all of us will be parents): rather, these are "mindsets" that all of us adopt at some time or another in our lives, sometimes concurrently. This does not mean we have multiple personalities, instead it means we deal with certain situations, places, people and events differently. I will explain further.
The Parent Mindset. This is the more over-zealous third, signified by phrases like "You should..." or "Don't do that..." Berne calls it the "taught" state and people who are "Parents" (whether they have actual kids or not) are typically giving advice or opinions and simply telling others what to do most of the time.
The Child Mindset. This is the "feeling" third, emotions typically get in the way of good conduct and/or progress. An adult is quite often reduced to the child mindset when they return to the house where they grew up, which is why Christmas can be so full of fun but also childish and spiteful arguments if the whole family gathers together.
The Adult Mindset. This is about the "here and now" and in direct contrast to both the other states, not unhealthily influenced by things that may have happened in our pasts. People who exist within the adult state are aware of the certain difficulties associated with events, people, places and so on but are careful to remain calm and collected, even in the fact of actual conforntation. The adult will never threaten to not see someone ever again, but work through the problem and accept their own part in it.
You will probably recognise parts of yourself in all three of those states; that's no accident - we are all capable of existing through all three states, if only for the fact the margins are hugely wide. As with all psychological stuff, it touches on the edges of who and what we are, yet leaves the middle out conveniently so we can apply almost anything these guys say to ourselves, kind of like horoscope predictions.
One thing I like a lot however about having studied something like this is how useful it comes in for writing fiction. Whether a script, novel, short story or whatever, you *could* practice what I call "Transactional Characterisation": in other words, using only characters that give something, but crucially not to each other: the narrative instead. As a script reader I see a lot of characters who might have some great lines or be really colourful, yet I'm wondering what their actual part is for.
If your characters don't contribute directly to the central thrust of your narrative, actually give something that impacts on the actions of the other characters and/or your story, then what is their purpose? We all know the protagonist *generally* drives the narrative against the obstacle of the anatagonist, but often secondary characters are making a series of entrances rather than making that all-important transaction themselves. For example: best friends help the protagonist; minions help the antagonist. Sometimes best friends help the antagonist by accident or because the protagonist has wronged them in some way (thus the best friend goes over to the dark side) and doom nearly befalls the antagonist. That's all transaction there. I like to think of it as:
Someone does one thing = someone does another 'cos of that first thing = something happens because of it = and so it goes on
Quite straight forward: cause and effect, basically. But lots of scripts don't keep up the "domino effect" of one action depending on another action (whether it's the one before it or not, it doesn't have to be) and this is the primary cause of your structure meandering. But we've talked enough about structure, so what about those PAC states?
Well, thinking about the states people might pass through as a reaction (or not) to various events, people, situations and so on could also act as a very interesting addition to your characterisation. It means your characters are not the same all the way through, they're more layered, less 2D. If we consider John McClane in the DIE HARD franchise, he courts trouble with the glee of a child let loose on a firing range with a machine gun, yet at the same time makes moral judgements with abundance on those terrorists he faces (one man's terrorist is another man's freedom fighter, John - oh no, that's right, we're good, they're evil, BLOW THEM AWAY!!!!!!!!!!)
So the Parent and Child states probably afflict our protagonist and antagonist the most, but there is still room for that Adult state too: in horrors, it's the sole survivor who remains calm in the crisis (Ripley in Alien, Cooper in Dog Soldiers); secondary characters are usually the calm ones who advise protagonists in crisis in thrillers (Sean Penn in The Game); in dramas, someone who is searching for something may cause more trouble than they envisage (Secrets and Lies) or a bystanding secondary character may have to remain tight-lipped as a main character works through their own demons (Juliet Lewis re: Colin Firth in When Was The Last Time You Saw Your Father?).
There is drama in all of us, not only in terms of our "own" story, but in how we react and behave - and that is subject to change. A good girl might sometimes be bad, but it goes beyond that: we all have feelings, thus we cannot always be predicted. A good character might not go beyond the boundaries of narrative logic - ie. they can't just change personality 'cos it suits you - but they can surprise us.