NPC Melee Attack

If you liked this item, please rate it up on Steam Workshop page.

Author: Limakenori

Last revision: 19 Jun, 2024 at 09:01 UTC

File size: 15.63 KB

On Steam Workshop

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.