|
|
#1 |
|
Guest
Posts: n/a
|
npcs using custom weapons?
is there a way to make npcs like combine soldiers use added weapons?(in my case the sniper rifle, using the model from hl2ctf)
at the moment that just stand there looking at you with the wep thanks in advance |
|
|
|
#2 |
|
Guest
Posts: n/a
|
no help? D:
|
|
|
|
#3 |
![]() Join Date: Dec 2005
Reputation: 0
Posts: 144
|
Have you tried making them use it without any mods? The Combine can use the annabelle, so they should be able to use any single shot weapons you provide them.
|
|
|
|
|
|
#4 |
![]() Join Date: Jul 2007
Reputation: 84
Posts: 2,170
|
Have you given the weapon the required code for the AI to use it?
Specifically, the following functions: Operator_HandleAnimEvent, CapabilitiesGet, GetPrimaryAttackActivity... And while I don't think these are necessary, its worth also having: GetFireRate, GetMaxBurst & GetMinBurst? Copy & adjust these functions from the pistol or another weapon that you know the AI uses. |
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
ok ill try that
note that im using the left over sniper rifle code from the mod source, not the actual one from hl2ctf, im only using the model of that |
|
|
|
#6 |
![]() Join Date: Jul 2007
Reputation: 84
Posts: 2,170
|
Basically the AI doesn't fire a weapon using PrimaryAttack, but with the above mentioned code instead. So you'll have to adjust it from other weapons accordingly, and if you lack those functions, your weapon will not work.
|
|
|
|
|
|
#7 | |
|
Guest
Posts: n/a
|
this is the code i have so far:
http://files.filefront.com/weapon+sn.../fileinfo.html but it gets this on building the code: Quote:
im a horrible debugger so i have no idea what that means at all |
|
|
|
|
#8 |
![]() Join Date: Jul 2007
Reputation: 84
Posts: 2,170
|
Interpret that error as:
"You've already given the function a body at line 50, so also giving a body at line 178 is clearly gonna cause problems, hence I'm not gonna compile. Delete one or the other!" |
|
|
|
|
|
#9 |
![]() Join Date: Sep 2006
Reputation: 9
Posts: 2,691
|
Actually interpret that as:
You've got a function body at line 50 that's also on line 178. And to top it off you havent declared the second in the class definition. :P |
|
|
|
|
|
#10 | |
![]() Join Date: Jul 2007
Reputation: 84
Posts: 2,170
|
Quote:
True, but at a glance the only difference i saw was that the second one is const int while the first is just int. I was attempting to add context missing in the errors, but yes, in order to do so, i had to change what they said. Technically.
|
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|