• How to script a SWEP for NPC
    5 replies, posted
Tried to do it with functions SWEP:NPCPrimary_Attack() and other stuff, but I still can't figure out how to make them actually shoot, because now they just play the attack animation. Anyone knows how to do this?
SWEP:NPCPrimary_Attack is a callback function that should be called when NPC tries to shoot.
So the function I should be using is SWEP:PrimaryAttack?
[QUOTE=Masster;47392167]So the function I should be using is SWEP:PrimaryAttack?[/QUOTE] I never said that.
Then the function I need to use for NPC to shoot is SWEP:NPCPrimary_Attack ?
[QUOTE=Masster;47398183]Then the function I need to use for NPC to shoot is SWEP:NPCPrimary_Attack ?[/QUOTE] I don't think you can force NPC to shoot, but SWEP:NPCPrimary_Attack should be called ( not saying will be because I haven't messed around with this for a long time ) on the SWEP the NPC is currently carrying, just like SWEP:PrimaryAttack is called when a player tries to shoot. I also wasn't able to alter rate of fire or accuracy of the weapon for NPCs.
Sorry, you need to Log In to post a reply to this thread.