Posts: 40
Threads: 12
Joined: Sep 2009
Reputation:
0
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...
Posts: 162
Threads: 7
Joined: Oct 2007
Reputation:
0
Give the weapon to the NPC before you start recording the .rec file.
Posts: 40
Threads: 12
Joined: Sep 2009
Reputation:
0
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.
Posts: 162
Threads: 7
Joined: Oct 2007
Reputation:
0
Right, then I must say the only way is attaching a gun object to the NPC.