Garry's Mod

Garry's Mod

632 ratings
NPC Melee Attack
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun, Roleplay, Realism
File Size
Posted
Updated
15.627 KB
16 Jun, 2024 @ 12:44am
19 Jun, 2024 @ 2:01am
3 Change Notes ( view )

Subscribe to download
NPC Melee Attack

In 2 collections by Limakenori
Limakenori's addons
89 items
EZmod
15 items
Description
Hello there! Welcome to NPC Melee Attack addon
This addon adds simple melee attack for NPC that don't have it

Features:
Unarmed NPCs with melee attack from this addon are more aggressive(cool for hand-to-hand fights)
Miss/hit sound
Hit sound based on damage
Viewpunch based on damage
Pushing
NPC with melee weapon won't do melee attack(with exception for weapons that are in the White list)
DSS Support

Supports:
Supported NPCs by default:
npc_metropolice, npc_alyx, npc_barney, npc_odessa, npc_citizen and NPCs that you can add with settings

Commands:
1. meleeattack_npcs_add - this command add ability for unsupported by default NPC to use grenade throwing
Example: meleeattack_npcs_add npc_citizen 10 0.5 "meleeattack01" 0.5 80 90 0 0 0 0
First value is NPC's class; second value is attack's damage; third value is time until damage; fourth value is melee animation(don't put gestures here!!!); fifth value is attack cooldown; sixth value is attack distance; seventh value is damage distance; eighth value is should NPC do melee only if armed?(0 - false, 1 - true); other values are push strenght(forward, right, up)

2. meleeattack_npcs_edit - this command edits 1 value from supported NPCs
Example: grenthrow_npcs_edit npc_citizen attachement "anim_attachment_lh"
First value is NPC's class; second value is the value you want to change in supported NPC; third value is what you want to change previous value to
Values list:
damage - number
damagetime - number
animation - animation name
cooldown - number
distance - number
damage distance - number
onlyifarmed - number (0 - false, 1 - true)
forward - number
right - number
up - number

3. meleeattack_npcs_remove - this command removes NPC's ability to melee attack
Example: grenthrow_npcs_remove npc_citizen
First value is NPC's class

4. meleeattack_npcs_reload - this commands reloads list of the NPCs that can do melee attack
Example: meleeattack_npcs_reload

4. meleeattack_npcs_add_animation - this commands adds animation for NPC's melee attack
Example: meleeattack_npcs_add_animation npc_metropolice thrust
First value is NPC's class, second is animation's name

6. meleeattack_wl_add - add melee weapon to the White list
Example: meleeattack_wl_add weapon_crowbar

7. meleeattack_wl_remove - remove melee weapon from the White list
Example: meleeattack_wl_remove weapon_crowbar

8. meleeattack_wl_check - check the White list
Example: meleeattack_wl_remove

9. meleeattack_wl_reload - reload the White list
Example: meleeattack_wl_reload

Settings:
Tool Panel >> Options >> Limakenori >> NPC Melee Attacks

Enjoy!

Tags: DSS NPC Weapon battle fight Gordon entropy ezt ez2 limakenori xengrenade weapon ar2 proto xenians expanded beneathacle water NPC HL half life BMS Mesa main character


Credits:
C0Mb0STR3Kx20 and Limakenori(me) - coding.
Popular Discussions View All (1)
23
18 Oct, 2024 @ 12:08pm
Bug Reports/Suggestions
Limakenori
88 Comments
mosesjr0527 1 Jul @ 9:36pm 
Will there be an update one day for them to block melee attacks if possible?
karkus 15 Jun @ 6:24am 
how do I remove animations
TheDesertRoad 23 May @ 7:04pm 
when they die they still punching
giorgibob152 27 Apr @ 11:34am 
time to make riot come true
jfernandez2202 18 Apr @ 8:12am 
Npcs still do the melee attack animation while their holding a lightsaber and a tfa melee weapon
MissingTexture 1 Feb @ 9:07am 
If you spawn an NPC, let it attack you for atleast a tiny bit, then set Ignore Players to true, the NPC will chase the player and start meleeing them, even though they shouldn't, because they're meant to be ignoring them. Please fix this.
Maqsud101 9 Jan @ 6:01am 
Theres any metrocop stunstick anim for playermodel?
Night Walker 15 Dec, 2024 @ 11:02am 
Can you make another NPC Melee Attack mod but their like star wars jedi Survivor attacks and dodges or would be like ASSASSIN'sS CREED npcs battles? Please?
Mr.4ox 16 Nov, 2024 @ 11:14am 
Real beyta
Pumpkin Boiling 18 Oct, 2024 @ 3:41pm 
From the corner of my eye when I first saw this addon, I thought the icon was of the metrocop doing the Floss emote from Fortnite