NPC.SetCurrentWeaponProficiency

From GMod Wiki

Jump to: navigation, search
Function
Syntax NPC:SetCurrentWeaponProficiency( Enum proficiency )
Description:
Sets the weapon proficiency of a NPC. (how accurate the NPC shoots with the weapon)
Returns: nil
In Object: Npc
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=NPC.SetCurrentWeaponProficiency]NPC.SetCurrentWeaponProficiency [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMakes all NPC's suck at handling weapons.
Used onNewerServer.png
Code
for _, v in pairs( ents.FindByClass( "npc_*" ) ) do
    v:SetCurrentWeaponProficiency( WEAPON_PROFICIENCY_POOR )
end
OutputN/A


Additional Notes

WEAPON_PROFICIENCY_POOR
WEAPON_PROFICIENCY_AVERAGE
WEAPON_PROFICIENCY_GOOD
WEAPON_PROFICIENCY_VERY_GOOD
WEAPON_PROFICIENCY_PERFECT

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox