Garry's Mod

Garry's Mod

696 ratings
NPC Grenade Throwing
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun, Movie, Roleplay
File Size
Posted
Updated
14.959 KB
31 May, 2024 @ 6:58pm
3 Oct, 2024 @ 12:36pm
4 Change Notes ( view )

Subscribe to download
NPC Grenade Throwing

In 2 collections by Limakenori
Limakenori's addons
86 items
EZmod
15 items
Description
Hello there! Welcome to NPC Grenade Throwing addon
This addon adds ability for NPCs to throw grenades

Note:
Zombie, vortigaunt and hunter that were shown in the gifs aren't supported by default. You should add them yourself using commands!

Features:
Settings
Commands
Customization
Animation
Support for any NPCs and grenades

Supports:
Supported NPCs:
npc_citizen - grenthrow_npcs_add npc_citizen npc_grenade_frag 2 "throw1" 0.8 "anim_attachment_rh" 1 1 1,
npc_alyx - grenthrow_npcs_add npc_alyx npc_grenade_frag 5 "throw1" 0.8 "anim_attachment_rh" 1 1 1,
npc_barney - grenthrow_npcs_add npc_barney npc_grenade_frag 5 "throw1" 0.8 "anim_attachment_rh" 1 1 1,
npc_metropolice - grenthrow_npcs_add npc_metropolice npc_grenade_frag 3 "grenadethrow" 0.8 "anim_attachment_lh" 1 1 1
and NPCs that you can add with commands

Settings:
Tool Panel >> Options >> Limakenori >> Throwing Grenades

Commands:
1. grenthrow_npcs_add - this command add ability for unsupported by default NPC to use grenade throwing
Example: grenthrow_npcs_add npc_citizen npc_grenade_frag 3 "throw1" 0.8 "anim_attachment_rh" 1 1 1
First value is NPC's class; second value is grenade's class; third value is amount of grenades(if you set -1 then NPC will have infinity amount of grenades); fourth value is throw animation; fifth value is time until grenade is thrown,; sixth value is the name(or number) of the attachment that used as a grenade's spawn position(if attachment doesn't exist, grenade will spawn from the center of NPC); seventh value is should NPC throw grenade only if armed?(0 - false, 1 - true); eighth value is force multiplier; ninth value is force multiplier up, tenth value is grenades model(this value is optional)

2. grenthrow_npcs_add - this command also can be used to add more grenades classes for NPC
Example: grenthrow_npcs_add npc_citizen grenade_spit
First value is NPC's class; second value is grenade's class
You can also add 1 grenade class multiple times, so it has more chance to be used.

3. grenthrow_npcs_edit - this command edits 1 value from supported NPCs grenade
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:
grenade - class
amount - number
animation - animation name
attachement - attachment name or number
onlyifarmed - number (0 - false, 1 - true)
force_multiplier - number
force_multiplier_up - number
model - model name

4. grenthrow_npcs_remove - this command removes NPC's ability to throw grenades
Example: grenthrow_npcs_add npc_citizen
First value is NPC's class

5. grenthrow_npcs_reload - this commands reloads list of the NPCs that can throw grenades
Example: grenthrow_npcs_reload

6. grenthrow_npcs_add_zombie - this command adds support for zombie to throw acid(like shown in 2 gifs)
Example: grenthrow_npcs_add_zombie

Enjoy!

Credits:
C0Mb0STR3Kx20 and Limakenori(me) - coding

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 bomb explosion power buff character
Popular Discussions View All (2)
24
25 Dec, 2024 @ 9:34am
PINNED: Suggestions
Limakenori
3
18 Jun, 2024 @ 10:05am
PINNED: Bug Reports
Limakenori
145 Comments
Zack 10 Jun @ 2:00pm 
should someone make an elite zombine snpc that throws grenades or shoots ar2 [stormtrooper aim because... well]
a.ognev 20 May @ 2:22pm 
Thank you
Limakenori  [author] 20 May @ 1:49pm 
grenthrow_npcs_remove YourNPCClass
a.ognev 20 May @ 1:38pm 
Which team is responsible for disabling grenades for Alliance soldiers ?
Male_09 2 May @ 4:30pm 
the grenades believe they can touch the sky
Male_09 2 May @ 4:30pm 
oh
i guess for that you should make a slider in the options that says "throw force" or smth that makes it so the grenades either land near the thrower or just believe they could fly
Limakenori  [author] 2 May @ 6:17am 
Yes, but if you read his first comment you'll notice that he wants them throwing grenades across the map.
Male_09 1 May @ 11:48pm 
dont combine soldiers by default throw grenades?
Victornotfound404 21 Apr @ 10:51pm 
btw thanks for answer, still test it out with max distance and 0 cooldown
Victornotfound404 21 Apr @ 10:45pm 
makes sense