Making NPCs shoot people.
#1

I've almost done it. I've created a function where npc is given a weapon, he is turned to the player direction and shooting animation is applied. There is also a tiny explosion for the shot and if a player is close enough to the bot, server will decrease his health and add a blood coming out object for a second. Looks pretty realistic. The only problem yet is that my bot won't hold a gun when I give it to it. (GivePlayerWeapon). How do I make it hold the gun? Don't tell me the only way to do this is to create an object with a gun model...
Reply
#2

Give the weapon to the NPC before you start recording the .rec file.
Reply
#3

You see.. this is not actually a NPC playing back a record. If it was playing a record, I wouldn't be able to turn it (Set it's facing angle) and I really need that. Also these bots are moved dynamicly (with setplayerpos and animations) and if I start playing the recording, the bot will automaticly snap to the place where it was recorded. I don't need that.
Reply
#4

Right, then I must say the only way is attaching a gun object to the NPC.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)