I've been wondering the same thing . . . I'm not at that stage yet, but I want to have stormtroopers using emplaced guns in my map.
There's a point somewhere in the Cairn levels, where an Imperial is using an emplaced gun to blast you. Then after you knock him off, you take over. So you might want to search the scripts to the Cairn levels for clues.
I understand why Raven didn't release all their source map files (because people would rip them off), but it's times like this I wish they had, so we can study how they implemented a feature.
EDIT: I found a script that may offer some clues.
This script is actually used in the bespin_streets level. It appears to make a Weequay use an emplaced gun. It's called weequay_emplaced.txt.
From what I can tell, you spawn the NPC next to the gun, get the NPC to use the gun, and then set its view to the same as the gun's? Finally, you tell it to start firing.
Don't know if this is exactly how it works. Maybe someone else has already figured this out. If not, let me know how you make out! Eventually I'm going to run into this same problem.
[This message has been edited by rwr (edited August 18, 2002).]
"Windows is a 32-bit patch for a 16-bit GUI shell running on top of an eight-bit operating system written for a four-bit processor by a two-bit company that can't stand one bit of competition."