Bob,
I missed your thread in among all the noise lately.
I've seen this before on some trams, but sorry I can't remember which ones. My assumption this is done by, as you've mentioned, a script that is somehow called up at the time of the animated door opening and closing. How to do this is beyond my abilities. If I can find those models, I'll post the KUID for you to perform an autopsy on to get the details on the process.