NPC.SetCurrentWeaponProficiency
From GMod Wiki
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: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=NPC.SetCurrentWeaponProficiency]NPC.SetCurrentWeaponProficiency [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Makes all NPC's suck at handling weapons. |
---|---|
Used on | |
Code | for _, v in pairs( ents.FindByClass( "npc_*" ) ) do v:SetCurrentWeaponProficiency( WEAPON_PROFICIENCY_POOR ) end |
Output | N/A |
Additional Notes
- Use these enumerations with the functon described on this page as arguments to this function. (they are self-explanatory)
WEAPON_PROFICIENCY_POOR WEAPON_PROFICIENCY_AVERAGE WEAPON_PROFICIENCY_GOOD WEAPON_PROFICIENCY_VERY_GOOD WEAPON_PROFICIENCY_PERFECT