View Full Version : Emplaced guns and NPCs

07-05-2003, 06:54 AM
How can I get an NPC to use an enplaced gun, like Reelo in Nar Shaddaa-Starport or the Weequay in Bespin-Streets? I've tried linking the NPC to the gun with CTRL-K but that doesn't work.

07-05-2003, 09:25 AM
Place the NPC right next to the gun in Radiant (I don't know if this is necessary, but it helps to keep the map tidy). Then give the gun a targetname, like biggun1 and the NPC a spawnscript. In the spawnscript set the command use("biggun1"). It has been a while since I did that, but if my memory serves me right, that should do the trick.

Or if you don't want to use a spawnscript, you can later affect the NPC by giving him an NPC_targetname, and by using the affect command include in the script the use("biggun1").

07-05-2003, 01:48 PM
Forgive my ignorance, lassev, but I have no experience in scripting, and doing exactly what you suggested caused my bsp to screw up and caused Radiant to crash when I tried to load my level! I don't suppose you could try explaining it in step-by-step easy-to-understand-for-newbie terminology? Thanks :)

07-06-2003, 09:12 AM
Hmm. Scripting is the only way to do it, as far as I know. And don't put the NPC inside the emplaced gun, even by accident, just near it will suffice.

I don't feel I can teach anybody to use BehavEd and script just like that, so I suggest you find a general tutorial how to set up BehavEd and do some scripts. Some places for that are for example:



Although the first one is about cutscenes really, and the second link didn't work when I just tested it, but it might be only temporary. Still, Kengo's tutorial should teach you something about scripting. After that, it'll be easy enough for you to understand my first post, rest assured of that.